It'd be hard to blame Huawei executives if they're feeling very nervous lately. The US has created havoc for ZTE by renewing an export ban over trade violations, potentially depriving it of its Android license and leaving it without a platform. How would Huawei avoid a similar fate? Simple: it would use its own operating system instead. South China Morning Post sources have claimed that Huawei has been developing its own mobile operating system (there are reportedly tablet and PC equivalents) ever since it and ZTE faced an American investigation in 2012. It's considered an investment for "worst-case scenarios," the insiders said.
The company hasn't released this OS because it isn't up to Android's level of quality and app support, the sources added.
Huawei hasn't confirmed or denied the software's existence, saying only that it "has no plans" to launch an in-house OS in the "foreseeable future" -- if there is one, there's no rush to use it. There was a purported meeting leak in 2012 that referenced a new platform.
It certainly wouldn't be surprising if Huawei had its own software at the ready. For one, the concept isn't unheard of: Samsung makes Tizen phones partly as a failsafe, while Apple was developing OS X/macOS on Intel for years in case it needed to switch away from PowerPC (which, of course, it did). And like those companies, it already has its own custom processors courtesy of HiSilicon. While it uses third-party hardware for some devices, it would have an easier time dropping American products than some of its rivals.
That's not to say that ditching Android would be easy. If it had to drop Android, it would lose ready-made access to Google services outside of China. Even a powerhouse phone like the P20 Pro would lose its allure if you had to either use third-party clients or stop using your Google account. Even in China, where Google services are blocked, vendors who could still use Android might have an advantage just by virtue of the abundance of apps. This secondary OS would mostly help Huawei avoid a nightmare situation where it suddenly lost Android and couldn't sell any phones until it found new software.