There was no absolute restriction on developing a competing OS (Samsung does it with Tizen for example). My understanding is that the restriction was on forking the Android codebase and shipping an OS based on that without the Play Store (you would then lose your Play Store license on all devices). Even then I'm not sure whether it's as strict as that, considering Xiaomi and others do it.
https://support.google.com/accounts/answer/6103523