Alphabet's decision to work with Huawei with the Nexus 6P unit (pictured) may have been strategic. Source: Alphabet.

Chinese smartphone vendor Xiaomi looked unstoppable three years ago. Combining a form-factor design and interface eerily reminiscent of Apple with Alphabet's (NASDAQ:GOOG) (NASDAQ:GOOGL) Android Open Source Project, or AOSP, operating system, the company quickly became the market share leader for smartphones in China.

Xiaomi increased its smartphone shipments by 226% in 2014, selling 61.1 million units versus 18.7 million the year before. And while there were always concerns about the company's path forward -- particularly about whether the company could compete as vigorously outside its home market -- many expected it to continue growing.

Then came last year. The company lost market share in China from users upgrading to higher-end units. Apple turned in an especially strong 2015 in the East Asian country, nearly doubling its revenue there in the last three calendar quarters compared to the year-ago period (its fourth calendar quarter will be announced Jan. 26). But perhaps Xiaomi's biggest competition isn't Apple, but Huawei, and that's good news for Alphabet.

Slowing growth for Xiaomi amid big plans for Huawei
Xiaomi's growth has slowed. For example, the company announced its internal goal of selling 80-100 million units earlier this year. But by the end of the first half, the company had shipped only 35 million units. While Xiaomi spun the announcement in its favor, it was worrisome given the fact that this figure included its new flagship Mi Note line, which went on sale in January.

To add insult to injury, an anticipated rebound in the second half of the year doesn't appear to have materialized. One reason is that Xiaomi didn't update its Mi4 unit in July 2015 as part of its annual refresh cycle. The Mi5 device will now be unveiled in February. Following it disappointing first-quarter figures, research and analytics firm Canalys claimed that Xiaomi had been overtaken as the top smartphone vendor in China by Huawei. Even worse for Xiaomi, a recent report from VentureBeat detailed Huawei's plans to release four new models in 2016.

How does Alphabet win here?
On the strength of lower-coast Asian vendors sporting AOSP, Android is the dominant operating system in the country with 74% market share, according to Kantar Worldpanel's last survey. In these cases, though, it's tougher for Alphabet to monetize its users as a combination of smartphone vendors and a censor-prone government have essentially banned Android's monetization model for Android users.

Alphabet needs a two-fold strategy to reverse this trend: It must first convince the Politburo to allow its host (or some) of its services back in the country. There's already whispers on that front with Lenovo's mobile head recently saying he "expects" Google Play to enter the Chinese market soon, as Apple's iTunes is now available in China.

Second, for Google Play to enter the market, it has to enlist smartphone makers to include its service on their units. Huawei seems to be comfortable working alongside Alphabet, and even manufactures the company's flagship Nexus 6P flagship device. Alphabet stands a better chance shaping its ecosystem's monetization path forward with a hardware maker it has a strong relationship with than with one it does not. This is why Huawei's rise in the country is good news for Alphabet.