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

Commit 82a5ab8a authored by Rambo Wang's avatar Rambo Wang
Browse files

Expose permission READ_PRECISE_PHONE_STATE as public API

PhoneStateListener will check if apps declare permision
READ_PRECISE_PHONE_STATE when apps try to register the following
phone state change:
- LISTEN_PRECISE_CALL_STATE
- LISTEN_DATA_CONNECTION_REAL_TIME_INFO
- LISTEN_CALL_DISCONNECT_CAUSES
- LISTEN_CALL_ATTRIBUTES_CHANGED
- LISTEN_IMS_CALL_DISCONNECT_CAUSES

But as this permission is hide. None of the public APIs can request
the permission from apps in the javadoc.

By publishing the permission, we can receive intended request from
apps and all APIs require the permission can declair in javadoc.

Bug: 147324131
Test: N/A

Change-Id: I0234ebcba705e43ab7e8bc625516c4bcb10cd0b2
parent 9c8b644b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ package android {
    field public static final String READ_LOGS = "android.permission.READ_LOGS";
    field public static final String READ_PHONE_NUMBERS = "android.permission.READ_PHONE_NUMBERS";
    field public static final String READ_PHONE_STATE = "android.permission.READ_PHONE_STATE";
    field public static final String READ_PRECISE_PHONE_STATE = "android.permission.READ_PRECISE_PHONE_STATE";
    field public static final String READ_SMS = "android.permission.READ_SMS";
    field public static final String READ_SYNC_SETTINGS = "android.permission.READ_SYNC_SETTINGS";
    field public static final String READ_SYNC_STATS = "android.permission.READ_SYNC_STATS";
+3 −1
Original line number Diff line number Diff line
@@ -2057,8 +2057,10 @@
        android:protectionLevel="signature|privileged" />

    <!-- Allows read only access to precise phone state.
         @hide Pending API council approval -->
         Allows reading of detailed information about phone state for special-use applications
         such as dialers, carrier applications, or ims applications. -->
    <permission android:name="android.permission.READ_PRECISE_PHONE_STATE"
        android:permissionGroup="android.permission-group.UNDEFINED"
        android:protectionLevel="signature|privileged" />

    <!-- @SystemApi Allows read access to privileged phone state.