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

Commit 17eae45c authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Remove grouping for platform permissions

The grouping was never meant to be authorative, but this was not
documented. This lead to people assuming that it would not change and
implemented code on top of it.

Further handling permissions and groups requires the app to handle all
kind of special cases which is not obvious. By not exposing the grouping
the app developer will become aware that she/he should not handle
permissions.

Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.PermissionsHostTest
Change-Id: Iad1480efde338fa8c1cfba6372b1552c5d2361c0
parent 9da5f37f
Loading
Loading
Loading
Loading
+0 −37
Original line number Diff line number Diff line
@@ -642,7 +642,6 @@
        <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.READ_CONTACTS"
        android:permissionGroup="android.permission-group.CONTACTS"
        android:label="@string/permlab_readContacts"
        android:description="@string/permdesc_readContacts"
        android:protectionLevel="dangerous" />
@@ -651,7 +650,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.WRITE_CONTACTS"
        android:permissionGroup="android.permission-group.CONTACTS"
        android:label="@string/permlab_writeContacts"
        android:description="@string/permdesc_writeContacts"
        android:protectionLevel="dangerous" />
@@ -673,7 +671,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.READ_CALENDAR"
        android:permissionGroup="android.permission-group.CALENDAR"
        android:label="@string/permlab_readCalendar"
        android:description="@string/permdesc_readCalendar"
        android:protectionLevel="dangerous" />
@@ -682,7 +679,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.WRITE_CALENDAR"
        android:permissionGroup="android.permission-group.CALENDAR"
        android:label="@string/permlab_writeCalendar"
        android:description="@string/permdesc_writeCalendar"
        android:protectionLevel="dangerous" />
@@ -704,7 +700,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.SEND_SMS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_sendSms"
        android:description="@string/permdesc_sendSms"
        android:permissionFlags="costsMoney"
@@ -714,7 +709,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.RECEIVE_SMS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_receiveSms"
        android:description="@string/permdesc_receiveSms"
        android:protectionLevel="dangerous"/>
@@ -723,7 +717,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.READ_SMS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_readSms"
        android:description="@string/permdesc_readSms"
        android:protectionLevel="dangerous" />
@@ -732,7 +725,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.RECEIVE_WAP_PUSH"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_receiveWapPush"
        android:description="@string/permdesc_receiveWapPush"
        android:protectionLevel="dangerous" />
@@ -741,7 +733,6 @@
        <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.RECEIVE_MMS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_receiveMms"
        android:description="@string/permdesc_receiveMms"
        android:protectionLevel="dangerous" />
@@ -759,7 +750,6 @@
         <p>Protection level: dangerous
         @hide Pending API council approval -->
    <permission android:name="android.permission.READ_CELL_BROADCASTS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_readCellBroadcasts"
        android:description="@string/permdesc_readCellBroadcasts"
        android:protectionLevel="dangerous" />
@@ -801,7 +791,6 @@
     @deprecated replaced by new strongly-typed permission groups in Q.
     -->
    <permission android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:permissionGroup="android.permission-group.STORAGE"
        android:label="@string/permlab_sdcardRead"
        android:description="@string/permdesc_sdcardRead"
        android:protectionLevel="normal" />
@@ -822,7 +811,6 @@
         @deprecated replaced by new strongly-typed permission groups in Q.
    -->
    <permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
        android:permissionGroup="android.permission-group.STORAGE"
        android:label="@string/permlab_sdcardWrite"
        android:description="@string/permdesc_sdcardWrite"
        android:protectionLevel="normal" />
@@ -838,14 +826,12 @@

    <!-- Allows an application to read the user's shared audio collection. -->
    <permission android:name="android.permission.READ_MEDIA_AUDIO"
        android:permissionGroup="android.permission-group.MEDIA_AURAL"
        android:label="@string/permlab_audioRead"
        android:description="@string/permdesc_audioRead"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to modify the user's shared audio collection. -->
    <permission android:name="android.permission.WRITE_MEDIA_AUDIO"
        android:permissionGroup="android.permission-group.MEDIA_AURAL"
        android:label="@string/permlab_audioWrite"
        android:description="@string/permdesc_audioWrite"
        android:protectionLevel="dangerous" />
@@ -861,28 +847,24 @@

    <!-- Allows an application to read the user's shared images collection. -->
    <permission android:name="android.permission.READ_MEDIA_IMAGES"
        android:permissionGroup="android.permission-group.MEDIA_VISUAL"
        android:label="@string/permlab_imagesRead"
        android:description="@string/permdesc_imagesRead"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to modify the user's shared images collection. -->
    <permission android:name="android.permission.WRITE_MEDIA_IMAGES"
        android:permissionGroup="android.permission-group.MEDIA_VISUAL"
        android:label="@string/permlab_imagesWrite"
        android:description="@string/permdesc_imagesWrite"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to read the user's shared video collection. -->
    <permission android:name="android.permission.READ_MEDIA_VIDEO"
        android:permissionGroup="android.permission-group.MEDIA_VISUAL"
        android:label="@string/permlab_videoRead"
        android:description="@string/permdesc_videoRead"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to modify the user's shared video collection. -->
    <permission android:name="android.permission.WRITE_MEDIA_VIDEO"
        android:permissionGroup="android.permission-group.MEDIA_VISUAL"
        android:label="@string/permlab_videoWrite"
        android:description="@string/permdesc_videoWrite"
        android:protectionLevel="dangerous" />
@@ -890,7 +872,6 @@
    <!-- Allows an application to access any geographic locations persisted in the
         user's shared collection. -->
    <permission android:name="android.permission.ACCESS_MEDIA_LOCATION"
        android:permissionGroup="android.permission-group.MEDIA_VISUAL"
        android:label="@string/permlab_mediaLocation"
        android:description="@string/permdesc_mediaLocation"
        android:protectionLevel="dangerous" />
@@ -921,7 +902,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ACCESS_FINE_LOCATION"
        android:permissionGroup="android.permission-group.LOCATION"
        android:label="@string/permlab_accessFineLocation"
        android:description="@string/permdesc_accessFineLocation"
        android:backgroundPermission="android.permission.ACCESS_BACKGROUND_LOCATION"
@@ -932,7 +912,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ACCESS_COARSE_LOCATION"
        android:permissionGroup="android.permission-group.LOCATION"
        android:label="@string/permlab_accessCoarseLocation"
        android:description="@string/permdesc_accessCoarseLocation"
        android:backgroundPermission="android.permission.ACCESS_BACKGROUND_LOCATION"
@@ -945,7 +924,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
        android:permissionGroup="android.permission-group.LOCATION"
        android:label="@string/permlab_accessBackgroundLocation"
        android:description="@string/permdesc_accessBackgroundLocation"
        android:protectionLevel="dangerous|instant" />
@@ -986,7 +964,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.READ_CALL_LOG"
        android:permissionGroup="android.permission-group.CALL_LOG"
        android:label="@string/permlab_readCallLog"
        android:description="@string/permdesc_readCallLog"
        android:protectionLevel="dangerous" />
@@ -1005,7 +982,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.WRITE_CALL_LOG"
        android:permissionGroup="android.permission-group.CALL_LOG"
        android:label="@string/permlab_writeCallLog"
        android:description="@string/permdesc_writeCallLog"
        android:protectionLevel="dangerous" />
@@ -1016,7 +992,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.PROCESS_OUTGOING_CALLS"
        android:permissionGroup="android.permission-group.CALL_LOG"
        android:label="@string/permlab_processOutgoingCalls"
        android:description="@string/permdesc_processOutgoingCalls"
        android:protectionLevel="dangerous" />
@@ -1048,7 +1023,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.READ_PHONE_STATE"
        android:permissionGroup="android.permission-group.PHONE"
        android:label="@string/permlab_readPhoneState"
        android:description="@string/permdesc_readPhoneState"
        android:protectionLevel="dangerous" />
@@ -1057,7 +1031,6 @@
         granted by {@link #READ_PHONE_STATE} but is exposed to instant applications.
         <p>Protection level: dangerous-->
    <permission android:name="android.permission.READ_PHONE_NUMBERS"
        android:permissionGroup="android.permission-group.PHONE"
        android:label="@string/permlab_readPhoneNumbers"
        android:description="@string/permdesc_readPhoneNumbers"
        android:protectionLevel="dangerous|instant" />
@@ -1067,7 +1040,6 @@
        <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.CALL_PHONE"
        android:permissionGroup="android.permission-group.PHONE"
        android:permissionFlags="costsMoney"
        android:label="@string/permlab_callPhone"
        android:description="@string/permdesc_callPhone"
@@ -1077,7 +1049,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"
        android:permissionGroup="android.permission-group.PHONE"
        android:label="@string/permlab_addVoicemail"
        android:description="@string/permdesc_addVoicemail"
        android:protectionLevel="dangerous" />
@@ -1086,7 +1057,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.USE_SIP"
        android:permissionGroup="android.permission-group.PHONE"
        android:description="@string/permdesc_use_sip"
        android:label="@string/permlab_use_sip"
        android:protectionLevel="dangerous"/>
@@ -1095,7 +1065,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ANSWER_PHONE_CALLS"
        android:permissionGroup="android.permission-group.PHONE"
        android:label="@string/permlab_answerPhoneCalls"
        android:description="@string/permdesc_answerPhoneCalls"
        android:protectionLevel="dangerous|runtime" />
@@ -1123,7 +1092,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ACCEPT_HANDOVER"
                android:permissionGroup="android.permission-group.PHONE"
                android.label="@string/permlab_acceptHandover"
                android:description="@string/permdesc_acceptHandovers"
                android:protectionLevel="dangerous" />
@@ -1147,7 +1115,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.RECORD_AUDIO"
        android:permissionGroup="android.permission-group.MICROPHONE"
        android:label="@string/permlab_recordAudio"
        android:description="@string/permdesc_recordAudio"
        android:protectionLevel="dangerous|instant"/>
@@ -1169,7 +1136,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.ACTIVITY_RECOGNITION"
        android:permissionGroup="android.permission-group.ACTIVITY_RECOGNITION"
        android:label="@string/permlab_activityRecognition"
        android:description="@string/permdesc_activityRecognition"
        android:protectionLevel="dangerous|instant" />
@@ -1218,7 +1184,6 @@
         <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.CAMERA"
        android:permissionGroup="android.permission-group.CAMERA"
        android:label="@string/permlab_camera"
        android:description="@string/permdesc_camera"
        android:protectionLevel="dangerous|instant" />
@@ -1242,7 +1207,6 @@
         measure what is happening inside his/her body, such as heart rate.
         <p>Protection level: dangerous -->
    <permission android:name="android.permission.BODY_SENSORS"
        android:permissionGroup="android.permission-group.SENSORS"
        android:label="@string/permlab_bodySensors"
        android:description="@string/permdesc_bodySensors"
        android:protectionLevel="dangerous" />
@@ -1721,7 +1685,6 @@
    <p>Protection level: dangerous
    -->
    <permission android:name="android.permission.GET_ACCOUNTS"
        android:permissionGroup="android.permission-group.CONTACTS"
        android:protectionLevel="dangerous"
        android:description="@string/permdesc_getAccounts"
        android:label="@string/permlab_getAccounts" />