There are a lot of reasons to assume Huawei’s numbers would be on the decline. Even without getting caught smack in the middle of increasing trade tensions between two superpowers, the smartphone market has been trending down for some time now. A confluence of factors have contributed, including slowed upgrade cycles and stagnate economies in both China and abroad.

The market continues to “soften” in China as early adopters await the launch of 5G before jumping on with a new handset. In spite of everything, however, Huawei appears to be the one company currently bucking the trend. And not just by a little bit, either. New numbers from Canalys put the company at a 31% year on year grown for the second quarter — a stark contrast to the 6% global decline for the category.

The company shipped 37.3 million handsets in China for Q2, with China accounting for 64% of that number. Unsurprisingly, its home market has become an increasingly important sales driver as trade blacklists and the like have barred it from sales in some overseas markets.

An interesting, if unsurprising, factor in that growth is a kind of hometown pride for the embattled brand, which sported a 38% market share for the quarter.

“[T]he US-China trade war is also creating new opportunities. Huawei’s retail partners are rolling out advertisements to link Huawei with being the patriotic choice, to appeal to a growing demographic of Chinese consumers willing to take political factors into account when making a purchase decision,” Canalys’ Mo Jia said in a release tied to the news. “Huawei itself has also been eager to give more exposure to its founder and CEO, Ren Zhengfei, to enhance its brand appeal to local consumers. At the same time, Huawei’s internal chipset and modem technologies will give it an edge over its competitors as 5G is commercialized by Chinese operators.”

That last bit means that Huawei will almost certainly see more growth in the coming years as 5G begins to roll out in China, starting this fall. This is, of course, as long as a ban on the use of American software and components don’t hamper the company entirely in the meantime.

Huawei was cautiously optimistic reporting its quarterly earnings this week. “Given the foundation we laid in the first half of the year, we continue to see growth even after we were added to the entity list,” Chairman Liang Hua said on a call. “That’s not to say we don’t have difficulties ahead. We do, and they may affect the pace of our growth in the short term.”