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

Commit 35cfbaef authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Clear caller identify before registering and unregistering phone acct."

am: 91d5655e

Change-Id: I8ad58f5f59ab552180415990b1f4ba6f53681443
parents a17d4430 91d5655e
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;