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

Unverified Commit 5e99edb1 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-9.0.0_r62' into staging/lineage-16.0_merge-android-security-9.0.0_r62

Android security 9.0.0 release 62

* tag 'refs/tags/android-security-9.0.0_r62':
  Fix security vulnerability of TelecomManager#getPhoneAccountsForPackage
  DO NOT MERGE Add flag to default dialer change dialog
  Prevent TelecomManager#endCall from ending emergency calls.

Change-Id: I1167adee5c1437cb3ab279ccfc22ed357ceb2fca
parents f530ab0e 0bf3b008
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -234,6 +234,23 @@ public class TelecomServiceImpl {

        @Override
        public List<PhoneAccountHandle> getPhoneAccountsForPackage(String packageName) {
            //TODO: Deprecate this in S
            try {
                enforceCallingPackage(packageName);
            } catch (SecurityException se1) {
                EventLog.writeEvent(0x534e4554, "153995334", Binder.getCallingUid(),
                        "getPhoneAccountsForPackage: invalid calling package");
                throw se1;
            }

            try {
                enforcePermission(READ_PRIVILEGED_PHONE_STATE);
            } catch (SecurityException se2) {
                EventLog.writeEvent(0x534e4554, "153995334", Binder.getCallingUid(),
                        "getPhoneAccountsForPackage: no permission");
                throw se2;
            }

            synchronized (mLock) {
                final UserHandle callingUserHandle = Binder.getCallingUserHandle();
                long token = Binder.clearCallingIdentity();