In brief: The smartphone market is continuing to shrink, with only three of the top five big players experiencing an increase in shipments: Samsung, Xiaomi (slightly), and, surprisingly, Huawei.

Analyst firm Gartner has released its worldwide smartphone sales data for Q2 2019, and it's not good news for the industry. Total shipments have fallen 1.7 percent compared to the same period last year, dropping from 374 million to 367 million.

Part of the problem is that more people are waiting longer before upgrading their handsets to the latest devices. A recent survey showed that most consumers wait between three and five years before buying a new phone.

Samsung retained its long-held position at the top of the table as its shipments went up by almost 3 million units YoY. And despite its placement on an Entity List, thereby raising concerns over its future relationship with Google and Android OS, Huawei sales were up 16.3 percent YoY.

"As a result, they both grew market share in the quarter, which led them to account for more than a third of total smartphone sales globally," Gartner said.

While the US government's ban announcement led to a fall in global sales for Huawei's handsets, these improved following the recent 90-day extension it was granted. But the company mostly has China to thank for its success. Its devices grew in popularity by 31 percent in the country, resulting in 58 percent of Huawei's sales being generated in China.

It was unwelcome news for Apple, which saw iPhone shipments decline from 44 million to 38.5 million--- a 13.8 percent YoY fall. That means big rival Samsung moved almost double the number of handset that Cupertino managed last quarter. Apple CEO Tim Cook has blamed slow sales in China and the battery replacement program as factors behind the declining shipments.

Gartner said smartphone sales will "remain weak" for the rest of the year, and will total 1.5 billion units in 2019. That's down from the 1.55 billion sales in 2018.