Merge "Don't cancel notifications when pausing work apps" into udc-dev am: 7c966b0c49 am: d5cae70ee4 am: 516bfcdc24

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23480026

Change-Id: Ib3a1ec1d27861ee8b49d9351313bb99500481b75
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Pavel Grafov
2023-06-02 15:26:10 +00:00
committed by Automerger Merge Worker

View File

@@ -1843,7 +1843,7 @@ public class NotificationManagerService extends SystemService {
} }
} else if (action.equals(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)) { } else if (action.equals(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)) {
int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1); int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
if (userHandle >= 0) { if (userHandle >= 0 && !mDpm.isKeepProfilesRunningEnabled()) {
cancelAllNotificationsInt(MY_UID, MY_PID, null, null, 0, 0, true, userHandle, cancelAllNotificationsInt(MY_UID, MY_PID, null, null, 0, 0, true, userHandle,
REASON_PROFILE_TURNED_OFF, null); REASON_PROFILE_TURNED_OFF, null);
mSnoozeHelper.clearData(userHandle); mSnoozeHelper.clearData(userHandle);