commit | b4f372a76ea5d72895a52459d7affc6169d569c3 | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Mon Jul 10 16:17:02 2023 -0400 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Wed Jul 12 01:59:40 2023 +0000 |
tree | 8662a152a2d1137f73d56f438c5d73c2a4191341 | |
parent | 10ae5fc66a9451c3ccde763de20b9af3c7aecea3 [diff] |
Relax policy for non-dismissible calls Test: NotificationManagerServiceTest Test: test app; CallStyle without ongoing flag is dismissible; CallStyle with ongoing flag is not Fixes: 290684762 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5ec7baf068ea7a02c4231526b69bf3415fd5d9e2) Merged-In: Id617ac75595704330fc54ede9d9690eef0fa0bf0 Change-Id: Id617ac75595704330fc54ede9d9690eef0fa0bf0
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 488745c..a3142cd 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -7000,7 +7000,7 @@ */ private boolean canBeNonDismissible(ApplicationInfo ai, Notification notification) { return notification.isMediaNotification() || isEnterpriseExempted(ai) - || isCallNotification(ai.packageName, ai.uid, notification) + || notification.isStyle(Notification.CallStyle.class) || isDefaultSearchSelectorPackage(ai.packageName); }
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java index cebc540..96305ae 100755 --- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java +++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -11166,7 +11166,6 @@ // Given: a call notification has the flag FLAG_ONGOING_EVENT set // feature flag: ALLOW_DISMISS_ONGOING is on mTestFlagResolver.setFlagOverride(ALLOW_DISMISS_ONGOING, true); - when(mTelecomManager.isInManagedCall()).thenReturn(true); Person person = new Person.Builder() .setName("caller")