Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbc9be2d authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Clear caller identify before registering and unregistering phone acct.

This was causing a problem with the intents broadcast from CallsManager.

Test: Ran CTS, Manual
Bug: 37430159
Change-Id: I7c7486cfe13f1465bd7fafa7ad64dc426289c987
parent 9533e0a4
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -399,7 +399,12 @@ public class TelecomServiceImpl {
                            enforceRegisterMultiUser();
                        }
                        enforceUserHandleMatchesCaller(account.getAccountHandle());
                        final long token = Binder.clearCallingIdentity();
                        try {
                            mPhoneAccountRegistrar.registerPhoneAccount(account);
                        } finally {
                            Binder.restoreCallingIdentity(token);
                        }
                    } catch (Exception e) {
                        Log.e(this, e, "registerPhoneAccount %s", account);
                        throw e;
@@ -418,7 +423,12 @@ public class TelecomServiceImpl {
                    enforcePhoneAccountModificationForPackage(
                            accountHandle.getComponentName().getPackageName());
                    enforceUserHandleMatchesCaller(accountHandle);
                    final long token = Binder.clearCallingIdentity();
                    try {
                        mPhoneAccountRegistrar.unregisterPhoneAccount(accountHandle);
                    } finally {
                        Binder.restoreCallingIdentity(token);
                    }
                } catch (Exception e) {
                    Log.e(this, e, "unregisterPhoneAccount %s", accountHandle);
                    throw e;