How does Google “force” a feature on other brands’ phones?

Wait 5 sec.

lIf Android is open source, how can Google "force" mobile phone brands to adopt a feature established in a specific version of Android? For example: Android X requires apps to ask for permission before sending notifications. So how can we guarantee that anyone using Android X will comply with this Android feature?