Loading core/res/AndroidManifest.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1942,6 +1942,14 @@ android:description="@string/permdesc_broadcastPackageRemoved" android:protectionLevel="signature" /> <!-- Allows an application to cancel notifications from other apps --> <permission android:name="android.permission.CANCEL_NOTIFICATIONS" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" android:protectionLevel="signature|system" android:label="@string/permlab_cancelNotifications" android:description="@string/permdesc_cancelNotifications" /> <!-- Allows an application to intercept and rewrite outgoing SMS @hide --> <permission android:name="android.permission.INTERCEPT_SMS" Loading core/res/res/values/cm_strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,11 @@ <!-- The item label for the no profile selection item. --> <string name="profile_none">None</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_cancelNotifications">cancel application notifications</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_cancelNotifications">Allows the app to cancel notifications created by other apps.</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_interceptSmsSent">intercept outgoing SMS</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> Loading services/java/com/android/server/NotificationManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1583,6 +1583,10 @@ public class NotificationManagerService extends INotificationManager.Stub } void checkCallerIsSystemOrSameApp(String pkg) { if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CANCEL_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { return; } int uid = Binder.getCallingUid(); if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) { return; Loading Loading
core/res/AndroidManifest.xml +8 −0 Original line number Diff line number Diff line Loading @@ -1942,6 +1942,14 @@ android:description="@string/permdesc_broadcastPackageRemoved" android:protectionLevel="signature" /> <!-- Allows an application to cancel notifications from other apps --> <permission android:name="android.permission.CANCEL_NOTIFICATIONS" android:permissionGroup="android.permission-group.SYSTEM_TOOLS" android:protectionLevel="signature|system" android:label="@string/permlab_cancelNotifications" android:description="@string/permdesc_cancelNotifications" /> <!-- Allows an application to intercept and rewrite outgoing SMS @hide --> <permission android:name="android.permission.INTERCEPT_SMS" Loading
core/res/res/values/cm_strings.xml +5 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,11 @@ <!-- The item label for the no profile selection item. --> <string name="profile_none">None</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_cancelNotifications">cancel application notifications</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_cancelNotifications">Allows the app to cancel notifications created by other apps.</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_interceptSmsSent">intercept outgoing SMS</string> <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. --> Loading
services/java/com/android/server/NotificationManagerService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1583,6 +1583,10 @@ public class NotificationManagerService extends INotificationManager.Stub } void checkCallerIsSystemOrSameApp(String pkg) { if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.CANCEL_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { return; } int uid = Binder.getCallingUid(); if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) { return; Loading