diff options
author | Alex Chau <alexchau@google.com> | 2015-07-02 14:37:01 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-02 14:37:04 +0000 |
commit | be6307606e71dd2a5ce483fa876ced268fd813bf (patch) | |
tree | 9597902694f6f251fa44cd7b83e5a1a3920c2bc8 | |
parent | 2ee3beedb1f6702f4c94eff24c896cd4a894082b (diff) | |
parent | 7ce2bd2161405cef9740a6f14d586a8964dad3e0 (diff) | |
download | frameworks_base-be6307606e71dd2a5ce483fa876ced268fd813bf.zip frameworks_base-be6307606e71dd2a5ce483fa876ced268fd813bf.tar.gz frameworks_base-be6307606e71dd2a5ce483fa876ced268fd813bf.tar.bz2 |
Merge "Clear "profile wiped" notification when a new porfile is created" into mnc-dev
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 0670cd2..5040bd0 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -390,6 +390,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } else if (Intent.ACTION_PACKAGE_REMOVED.equals(action) && !intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) { handlePackagesChanged(intent.getData().getSchemeSpecificPart(), userHandle); + } else if (Intent.ACTION_MANAGED_PROFILE_ADDED.equals(action)) { + clearWipeProfileNotification(); } } }; @@ -1067,6 +1069,9 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { filter.addAction(Intent.ACTION_PACKAGE_ADDED); filter.addDataScheme("package"); context.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler); + filter = new IntentFilter(); + filter.addAction(Intent.ACTION_MANAGED_PROFILE_ADDED); + context.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, mHandler); LocalServices.addService(DevicePolicyManagerInternal.class, mLocalService); } @@ -3409,6 +3414,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { getNotificationManager().notify(PROFILE_WIPED_NOTIFICATION_ID, notification); } + private void clearWipeProfileNotification() { + getNotificationManager().cancel(PROFILE_WIPED_NOTIFICATION_ID); + } + @Override public void getRemoveWarning(ComponentName comp, final RemoteCallback result, int userHandle) { if (!mHasFeature) { |