With less than a week to go before Apple reveals its latest earnings, a new report indicates that the tech giant lost more ground in China’s critical smartphone market.

According to Canalys, the overall Chinese smartphone market stumbled in the three months ending June 30. Smartphone shipments dipped by 3 percent to 113 million in the second quarter of 2017.

For Apple’s fiscal year, that same period is the third quarter, and the company will report earnings for those three months next Tuesday. In advance of the earnings report, Canalys said that Apple lost market share during the period and slipped to fifth place from fourth place in the Chinese market for smartphones.

Canalys did not specifically reveal how many iPhones Apple sold in China, but said: “The rest of the top 10, including Apple, Samsung, and Meizu, all suffered annual shipment declines this quarter.”

In general, the Chinese market is consolidating around the top five brands, according to Canalys. However, Apple is increasingly in danger of being squeezed by that consolidation. Canalys said the top four brands combined increased their marketshare by 10 percent compared to the same quarter one year ago.

Once seen as a key driver for Apple’s future growth, China has instead turned into a headache over the past two years. With sales continuing to slide in China, Apple recently appointed Isabel Ge Mahe to the newly created position of managing director and vice president for Greater China, which also covers Hong Kong and Taiwan.

Her challenges seem to be growing by the day.

Huawei shipped more than 23 million smartphones in the quarter, making it the top seller in China. Oppo was second, with more than 21 million phones shipped, a jump of 37 percent for the insurgent brand. Another upstart, Vivo, was third and shipped about 16 million.

The big winner, however, was Xiaomi. Once red hot, the brand had fallen into disarray but recently said it had turned things around. Canalys’ report confirmed this, saying Xiaomi shipped almost 15 million phones in China, an increase of 60 percent from the previous quarter.

“Xiaomi still offers the best value in the Chinese market, and it remains the preferred choice for price-conscious consumers,” said Canalys research analyst Lucio Chen, in a statement.

Earlier this year, Apple CEO Tim Cook expressed optimism about the company’s potential in China. At the same time, Apple has also begun pushing harder in India as it seeks to tap into that country’s growing appetite for smartphones.

Apple will get another shot at catalyzing sales in China later this year when it releases the new iPhone.