Don't send voicemail notification for managed profile
Bug: 18075090
Change-Id: I4db879db210455c254f739eec5958237cbe47852
diff --git a/src/com/android/phone/NotificationMgr.java b/src/com/android/phone/NotificationMgr.java
index 6ed9cbc..5489c47 100644
--- a/src/com/android/phone/NotificationMgr.java
+++ b/src/com/android/phone/NotificationMgr.java
@@ -344,9 +344,11 @@
final Notification notification = builder.build();
List<UserInfo> users = mUserManager.getUsers(true);
for (int i = 0; i < users.size(); i++) {
- UserHandle userHandle = users.get(i).getUserHandle();
+ final UserInfo user = users.get(i);
+ final UserHandle userHandle = user.getUserHandle();
if (!mUserManager.hasUserRestriction(
- UserManager.DISALLOW_OUTGOING_CALLS, userHandle)) {
+ UserManager.DISALLOW_OUTGOING_CALLS, userHandle)
+ && !user.isManagedProfile()) {
mNotificationManager.notifyAsUser(
null /* tag */, VOICEMAIL_NOTIFICATION, notification, userHandle);
}