commit | 6655630c962c68e5ca510f4d3249d00e819336f8 | [log] [tgz] |
---|---|---|
author | Xiaohui Chen <xiaohuic@google.com> | Wed Oct 21 11:19:42 2015 -0700 |
committer | Xiaohui Chen <xiaohuic@google.com> | Wed Oct 21 20:57:04 2015 +0000 |
tree | b8609c651b9099f21e7f9c07c3c5348a831ad9ce | |
parent | a15f791cd8f33565a7b03c86c9da186e5a1e235f [diff] |
Clean up UserHandle.isOwner() in frameworks Bug: 24869636 Change-Id: Ibebd7d0762f5375ee93ec101e7ab5578769bd9f6
diff --git a/services/core/java/com/android/server/notification/EventConditionProvider.java b/services/core/java/com/android/server/notification/EventConditionProvider.java index 88ef366..a4d5bce 100644 --- a/services/core/java/com/android/server/notification/EventConditionProvider.java +++ b/services/core/java/com/android/server/notification/EventConditionProvider.java
@@ -176,7 +176,7 @@ } mTrackers.clear(); for (UserHandle user : UserManager.get(mContext).getUserProfiles()) { - final Context context = user.isOwner() ? mContext : getContextForUser(mContext, user); + final Context context = user.isSystem() ? mContext : getContextForUser(mContext, user); if (context == null) { Slog.w(TAG, "Unable to create context for user " + user.getIdentifier()); continue;
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 4748c96..8385685 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3494,7 +3494,7 @@ final UserHandle caller = mInjector.binderGetCallingUserHandle(); // If there is a profile owner, redirect to that; otherwise query the device owner. ComponentName aliasChooser = getProfileOwner(caller.getIdentifier()); - if (aliasChooser == null && caller.isOwner()) { + if (aliasChooser == null && caller.isSystem()) { ActiveAdmin deviceOwnerAdmin = getDeviceOwnerAdminLocked(); if (deviceOwnerAdmin != null) { aliasChooser = deviceOwnerAdmin.info.getComponent();