telecom register-sim-phone-account for secondary users.

bug: 121100405
Test: cts-tradefed run cts-dev -a arm64-v8a -m CtsTelecomTestCases -t android.telecom.cts.RemoteConferenceTest#testRemoteConferenceCallbacks_ConferenceableConnections

... or:

$ adb shell am switch-user 11
$ adb shell dumpsys user | grep serial
  UserInfo{0:null:13} serialNo=0
  UserInfo{11:nick:10} serialNo=134
$ m cts
$ adb install -g out/target/product/generic_arm64/testcases/CtsTelecomTestCases/CtsTelecomTestCases.apk
$ adb shell telecom register-sim-phone-account android.telecom.cts/android.telecom.cts.CtsRemoteConnectionService xtstest_REMOTE_CALL_PROVIDER_ID 134 CTSRemoteConnectionService tel:666-TEST

Change-Id: Iecb3a5aa3999d8cc7bd7103815136dde38c49f06
diff --git a/src/com/android/server/telecom/TelecomServiceImpl.java b/src/com/android/server/telecom/TelecomServiceImpl.java
index f57a0c6..8f38984 100644
--- a/src/com/android/server/telecom/TelecomServiceImpl.java
+++ b/src/com/android/server/telecom/TelecomServiceImpl.java
@@ -472,7 +472,10 @@
                                 && extras.getBoolean(PhoneAccount.EXTRA_SKIP_CALL_FILTERING)) {
                             enforceRegisterSkipCallFiltering();
                         }
-                        enforceUserHandleMatchesCaller(account.getAccountHandle());
+                        final int callingUid = Binder.getCallingUid();
+                        if (callingUid != Process.SHELL_UID) {
+                            enforceUserHandleMatchesCaller(account.getAccountHandle());
+                        }
                         final long token = Binder.clearCallingIdentity();
                         try {
                             mPhoneAccountRegistrar.registerPhoneAccount(account);