am d0154550
: Merge "Deactivate notification listeners disabled at runtime." into jb-mr2-dev
* commit 'd0154550e0d5e8dea5b65849747266f5fa0d2d5d': Deactivate notification listeners disabled at runtime.
This commit is contained in:
@ -1133,6 +1133,7 @@ public class NotificationManagerService extends INotificationManager.Stub
|
|||||||
boolean queryRestart = false;
|
boolean queryRestart = false;
|
||||||
boolean queryRemove = false;
|
boolean queryRemove = false;
|
||||||
boolean packageChanged = false;
|
boolean packageChanged = false;
|
||||||
|
boolean cancelNotifications = true;
|
||||||
|
|
||||||
if (action.equals(Intent.ACTION_PACKAGE_ADDED)
|
if (action.equals(Intent.ACTION_PACKAGE_ADDED)
|
||||||
|| (queryRemove=action.equals(Intent.ACTION_PACKAGE_REMOVED))
|
|| (queryRemove=action.equals(Intent.ACTION_PACKAGE_REMOVED))
|
||||||
@ -1163,7 +1164,7 @@ public class NotificationManagerService extends INotificationManager.Stub
|
|||||||
.getApplicationEnabledSetting(pkgName);
|
.getApplicationEnabledSetting(pkgName);
|
||||||
if (enabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
if (enabled == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
|
||||||
|| enabled == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
|
|| enabled == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
|
||||||
return;
|
cancelNotifications = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pkgList = new String[]{pkgName};
|
pkgList = new String[]{pkgName};
|
||||||
@ -1172,8 +1173,10 @@ public class NotificationManagerService extends INotificationManager.Stub
|
|||||||
boolean anyListenersInvolved = false;
|
boolean anyListenersInvolved = false;
|
||||||
if (pkgList != null && (pkgList.length > 0)) {
|
if (pkgList != null && (pkgList.length > 0)) {
|
||||||
for (String pkgName : pkgList) {
|
for (String pkgName : pkgList) {
|
||||||
cancelAllNotificationsInt(pkgName, 0, 0, !queryRestart,
|
if (cancelNotifications) {
|
||||||
UserHandle.USER_ALL);
|
cancelAllNotificationsInt(pkgName, 0, 0, !queryRestart,
|
||||||
|
UserHandle.USER_ALL);
|
||||||
|
}
|
||||||
if (mEnabledListenerPackageNames.contains(pkgName)) {
|
if (mEnabledListenerPackageNames.contains(pkgName)) {
|
||||||
anyListenersInvolved = true;
|
anyListenersInvolved = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user