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

Commit 6c589570 authored by Svetoslav's avatar Svetoslav Committed by Svetoslav Ganov
Browse files

Remove unnecessary WRITE_SMS permission - framework

Currently only one app can write to the SMS provider and it has to
be set as the default SMS app by the user in the UI. The default
SMS app is set by enabling the write SMS app op for it and keeping
this op off for other SMS apps. Hence, this permission does not
guard anything and can be taken out. The API change is fine as if
an app refers to the permission in the manifest as string it will
be ignored and if it was referred in Java the value is statically
compiled in the source.

Change-Id: I1128c3b034e6c7dda4baa051500ac1ef46a53575
parent 9cf312db
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -156,7 +156,6 @@ package android {
    field public static final java.lang.String WRITE_PROFILE = "android.permission.WRITE_PROFILE";
    field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
    field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
    field public static final java.lang.String WRITE_SMS = "android.permission.WRITE_SMS";
    field public static final deprecated java.lang.String WRITE_SOCIAL_STREAM = "android.permission.WRITE_SOCIAL_STREAM";
    field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
    field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission.WRITE_USER_DICTIONARY";
+0 −1
Original line number Diff line number Diff line
@@ -228,7 +228,6 @@ package android {
    field public static final java.lang.String WRITE_PROFILE = "android.permission.WRITE_PROFILE";
    field public static final java.lang.String WRITE_SECURE_SETTINGS = "android.permission.WRITE_SECURE_SETTINGS";
    field public static final java.lang.String WRITE_SETTINGS = "android.permission.WRITE_SETTINGS";
    field public static final java.lang.String WRITE_SMS = "android.permission.WRITE_SMS";
    field public static final deprecated java.lang.String WRITE_SOCIAL_STREAM = "android.permission.WRITE_SOCIAL_STREAM";
    field public static final java.lang.String WRITE_SYNC_SETTINGS = "android.permission.WRITE_SYNC_SETTINGS";
    field public static final java.lang.String WRITE_USER_DICTIONARY = "android.permission.WRITE_USER_DICTIONARY";
+2 −2
Original line number Diff line number Diff line
@@ -438,14 +438,14 @@ public class AppOpsManager {
            null, // neighboring cells shares the coarse location perm
            android.Manifest.permission.CALL_PHONE,
            android.Manifest.permission.READ_SMS,
            android.Manifest.permission.WRITE_SMS,
            null, // no permission required for writing sms
            android.Manifest.permission.RECEIVE_SMS,
            android.Manifest.permission.RECEIVE_EMERGENCY_BROADCAST,
            android.Manifest.permission.RECEIVE_MMS,
            android.Manifest.permission.RECEIVE_WAP_PUSH,
            android.Manifest.permission.SEND_SMS,
            android.Manifest.permission.READ_SMS,
            android.Manifest.permission.WRITE_SMS,
            null, // no permission required for writing icc sms
            android.Manifest.permission.WRITE_SETTINGS,
            android.Manifest.permission.SYSTEM_ALERT_WINDOW,
            android.Manifest.permission.ACCESS_NOTIFICATIONS,
+0 −7
Original line number Diff line number Diff line
@@ -417,13 +417,6 @@
        android:description="@string/permdesc_readSms"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to write SMS messages. -->
    <permission android:name="android.permission.WRITE_SMS"
        android:permissionGroup="android.permission-group.SMS"
        android:label="@string/permlab_writeSms"
        android:description="@string/permdesc_writeSms"
        android:protectionLevel="dangerous" />

    <!-- Allows an application to receive WAP push messages. -->
    <permission android:name="android.permission.RECEIVE_WAP_PUSH"
        android:permissionGroup="android.permission-group.SMS"
+0 −15
Original line number Diff line number Diff line
@@ -684,21 +684,6 @@
      messages stored on your phone or SIM card. This allows the app to read all
      SMS messages, regardless of content or confidentiality.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_writeSms">edit your text messages (SMS or MMS)</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_writeSms" product="tablet">Allows the app to write
      to SMS messages stored on your tablet or SIM card. Malicious apps
      may delete your messages.</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_writeSms" product="tv">Allows the app to write
      to SMS messages stored on your TV or SIM card. Malicious apps
      may delete your messages.</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permdesc_writeSms" product="default">Allows the app to write
      to SMS messages stored on your phone or SIM card. Malicious apps
      may delete your messages.</string>

    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
    <string name="permlab_receiveWapPush">receive text messages (WAP)</string>
    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
Loading