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

Commit 4ec3b1c1 authored by Chen Xu's avatar Chen Xu Committed by android-build-merger
Browse files

Merge "add missing permission check in PhoneStateListener" am: feb7d14a am: b1022350

am: 18aa5e76

Change-Id: I05a42ca0faee0508ba50d73abcd3e3cb87cd6580
parents c8c1a256 18aa5e76
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2115,6 +2115,16 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
                    android.Manifest.permission.READ_PRECISE_PHONE_STATE, null);
        }

        if ((events & PhoneStateListener.LISTEN_RADIO_POWER_STATE_CHANGED) != 0) {
            mContext.enforceCallingOrSelfPermission(
                    android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, null);
        }

        if ((events & PhoneStateListener.LISTEN_VOICE_ACTIVATION_STATE) != 0) {
            mContext.enforceCallingOrSelfPermission(
                    android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, null);
        }

        return true;
    }