diff options
| author | 2015-06-16 22:31:27 +0000 | |
|---|---|---|
| committer | 2015-06-16 22:31:31 +0000 | |
| commit | fd0475702b6be5930eb8b6633ea877e06392044f (patch) | |
| tree | 9231048e8bca13c9f7c2fd5c4088936ad16ac4f7 | |
| parent | 2ce8daacac91f4ea8da3f8c6c08c8242a0316310 (diff) | |
| parent | df27d3bf3049b8e0b0c8ce432468be380a6eaeeb (diff) | |
Merge "Dismiss migration notification when wizard done." into mnc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index 05ee9c2f604f..d360875bce0f 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -53,6 +53,7 @@ public class StorageNotification extends SystemUI { private static final int MOVE_ID = 0x534d4f56; // SMOV private static final String ACTION_SNOOZE_VOLUME = "com.android.systemui.action.SNOOZE_VOLUME"; + private static final String ACTION_FINISH_WIZARD = "com.android.systemui.action.FINISH_WIZARD"; // TODO: delay some notifications to avoid bumpy fast operations @@ -107,6 +108,15 @@ public class StorageNotification extends SystemUI { } }; + private final BroadcastReceiver mFinishReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + // When finishing the adoption wizard, clean up any notifications + // for moving primary storage + mNotificationManager.cancelAsUser(null, MOVE_ID, UserHandle.ALL); + } + }; + private final MoveCallback mMoveCallback = new MoveCallback() { @Override public void onCreated(int moveId, Bundle extras) { @@ -146,6 +156,8 @@ public class StorageNotification extends SystemUI { mContext.registerReceiver(mSnoozeReceiver, new IntentFilter(ACTION_SNOOZE_VOLUME), android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS, null); + mContext.registerReceiver(mFinishReceiver, new IntentFilter(ACTION_FINISH_WIZARD), + android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS, null); // Kick current state into place final List<DiskInfo> disks = mStorageManager.getDisks(); |