summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-09 03:05:46 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-08-09 03:05:46 +0000
commit565677111d7c04ee1a8abaa0293e1b8439bdce30 (patch)
tree97cab8c8a702f74869e19ddde11ddda347e254c9
parentbea236f51b2a0eaff0dc02df8b99e3f8783dbf9d (diff)
parent3e35fc560389d060cebdf914ed1682ad2cfa0b43 (diff)
downloadTelephony-android14-d1-s6-release.tar.gz
Change-Id: I6720ab5d1c8bf757bf29a202e5c60a7fb6ad7142
-rw-r--r--src/com/android/phone/NotificationMgr.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index b28bd5c83..e111a2d70 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -409,7 +409,22 @@ public class NotificationMgr {
}
}
} else {
- cancelAsUser(Integer.toString(subId) /* tag */, VOICEMAIL_NOTIFICATION, UserHandle.ALL);
+ UserHandle subAssociatedUserHandle =
+ mSubscriptionManager.getSubscriptionUserHandle(subId);
+ List<UserHandle> users = getUsersExcludeDying();
+ for (UserHandle userHandle : users) {
+ boolean isManagedUser = mUserManager.isManagedProfile(userHandle.getIdentifier());
+ if (!hasUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, userHandle)
+ && (userHandle.equals(subAssociatedUserHandle)
+ || (subAssociatedUserHandle == null && !isManagedUser))
+ && !maybeSendVoicemailNotificationUsingDefaultDialer(phone, 0, null, null,
+ false, userHandle, isRefresh)) {
+ cancelAsUser(
+ Integer.toString(subId) /* tag */,
+ VOICEMAIL_NOTIFICATION,
+ userHandle);
+ }
+ }
}
}