This is a little bit different than Iran. The US government specifically does not want Iran to have access to nuclear technology, so preventing US companies from providing technology to Iran is in itself the goal.
In the case of Huawei, the US government's concerns mostly seem to be about Huawei possibly spying on the devices they sell. On the other hand, there doesn't seem to be any particular basis for concern about allowing them to use US software such as android. Therefore, from the perspective of the security threat that is the putative basis for blacklisting Huawei, the fact that Huawei is now blocked from using Android is merely an incidental side effect.
(Of course, if the real goal is to hold Huawei hostage as a means to negotiate a trade deal, then threatening to destroy their smartphone business by blocking them from using Android may be precisely what is really intended.)