SipBroadcastReceiver should only run in user 0

SipBroadcastReceiver is not expected to run in any user other
than user 0. You can see PhoneGlobal is inited in user 0 only here.
https://cs.corp.google.com/#android/packages/services/Telephony/src/com/android/phone/PhoneApp.java&q=%22new%20PhoneGlobals%22%20package:%5Eandroid$&l=40

In ag/862290, SipBroadcastReceiver starts listening BOOT_COMPLETED
broadcast, and after managed profile is created, BOOT_COMPLETED will sent
to managed profile and hence it crashes becoz PhoneGlobal is missing.

I try to add android:singleUser=true to SipBroadcastReceiver,
but it is still being kicked started.
And I guess it is because android:singleUser is ignored if the broadcast
is sent from system.

Code Ref:
https://cs.corp.google.com/#android/frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java&q=BroadcastQue%20package:%5Eandroid$&l=1095

Bug:27114313

Change-Id: Icd51fd229ee8cf32247df443297af77348ffe834
1 file changed