diff options
Diffstat (limited to 'packages')
5 files changed, 20 insertions, 20 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 0b49564..79761ec 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1381,7 +1381,6 @@ public abstract class BaseStatusBar extends SystemUI implements R.layout.notification_public_default, contentContainerPublic, false); publicViewLocal.setIsRootNamespace(true); - contentContainerPublic.setContractedChild(publicViewLocal); final TextView title = (TextView) publicViewLocal.findViewById(R.id.title); try { @@ -1447,6 +1446,7 @@ public abstract class BaseStatusBar extends SystemUI implements mContext.getResources().getConfiguration().fontScale); title.setPadding(0, topPadding, 0, 0); + contentContainerPublic.setContractedChild(publicViewLocal); entry.autoRedacted = true; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java index 8172a4d..86d7f4f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java @@ -311,9 +311,9 @@ public class NotificationContentView extends FrameLayout { } int visibleType = calculateVisibleType(); if (visibleType != mVisibleType || force) { - if (animate && (visibleType == VISIBLE_TYPE_EXPANDED && mExpandedChild != null) + if (animate && ((visibleType == VISIBLE_TYPE_EXPANDED && mExpandedChild != null) || (visibleType == VISIBLE_TYPE_HEADSUP && mHeadsUpChild != null) - || visibleType == VISIBLE_TYPE_CONTRACTED) { + || visibleType == VISIBLE_TYPE_CONTRACTED)) { runSwitchAnimation(visibleType); } else { updateViewVisibilities(visibleType); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java index a70ad43..3768ca4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java @@ -149,9 +149,6 @@ public class StackScrollState { // apply dimming view.setDimmed(state.dimmed, false /* animate */); - // apply dark - view.setDark(state.dark, false /* animate */, 0 /* delay */); - // apply hiding sensitive view.setHideSensitive( state.hideSensitive, false /* animated */, 0 /* delay */, 0 /* duration */); @@ -159,6 +156,9 @@ public class StackScrollState { // apply speed bump state view.setBelowSpeedBump(state.belowSpeedBump); + // apply dark + view.setDark(state.dark, false /* animate */, 0 /* delay */); + // apply clipping float oldClipTopAmount = view.getClipTopAmount(); if (oldClipTopAmount != state.clipTopAmount) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java index c995c8e..17e6e3d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -243,9 +243,6 @@ public class StackStateAnimator { // start dimmed animation child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed); - // start dark animation - child.setDark(viewState.dark, mAnimationFilter.animateDark, delay); - // apply speed bump state child.setBelowSpeedBump(viewState.belowSpeedBump); @@ -253,6 +250,9 @@ public class StackStateAnimator { child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive, delay, duration); + // start dark animation + child.setDark(viewState.dark, mAnimationFilter.animateDark, delay); + if (wasAdded) { child.performAddAnimation(delay, mCurrentLength); } diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index ad21555..05ee9c2 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -170,8 +170,8 @@ public class StorageNotification extends SystemUI { final String fsUuid = rec.getFsUuid(); final VolumeInfo info = mStorageManager.findVolumeByUuid(fsUuid); - if (info != null && info.isMountedWritable()) { - // Yay, private volume is here! + if ((info != null && info.isMountedWritable()) || rec.isSnoozed()) { + // Yay, private volume is here, or user snoozed mNotificationManager.cancelAsUser(fsUuid, PRIVATE_ID, UserHandle.ALL); } else { @@ -190,7 +190,7 @@ public class StorageNotification extends SystemUI { .setVisibility(Notification.VISIBILITY_PUBLIC) .setLocalOnly(true) .setCategory(Notification.CATEGORY_SYSTEM) - .setOngoing(true) + .setDeleteIntent(buildSnoozeIntent(fsUuid)) .build(); mNotificationManager.notifyAsUser(fsUuid, PRIVATE_ID, notif, UserHandle.ALL); @@ -202,9 +202,9 @@ public class StorageNotification extends SystemUI { if (volumeCount == 0 && disk.size > 0) { // No supported volumes found, give user option to format final CharSequence title = mContext.getString( - R.string.ext_media_unmountable_notification_title, disk.getDescription()); + R.string.ext_media_unsupported_notification_title, disk.getDescription()); final CharSequence text = mContext.getString( - R.string.ext_media_unmountable_notification_message, disk.getDescription()); + R.string.ext_media_unsupported_notification_message, disk.getDescription()); final Notification notif = new Notification.Builder(mContext) .setSmallIcon(getSmallIcon(disk, VolumeInfo.STATE_UNMOUNTABLE)) @@ -324,7 +324,7 @@ public class StorageNotification extends SystemUI { mContext.getString(R.string.ext_media_unmount_action), buildUnmountPendingIntent(vol))) .setContentIntent(initIntent) - .setDeleteIntent(buildSnoozeIntent(vol)) + .setDeleteIntent(buildSnoozeIntent(vol.getFsUuid())) .setCategory(Notification.CATEGORY_SYSTEM) .build(); @@ -342,7 +342,7 @@ public class StorageNotification extends SystemUI { mContext.getString(R.string.ext_media_unmount_action), buildUnmountPendingIntent(vol))) .setContentIntent(browseIntent) - .setDeleteIntent(buildSnoozeIntent(vol)) + .setDeleteIntent(buildSnoozeIntent(vol.getFsUuid())) .setCategory(Notification.CATEGORY_SYSTEM) .setPriority(Notification.PRIORITY_LOW) .build(); @@ -376,7 +376,7 @@ public class StorageNotification extends SystemUI { R.string.ext_media_unmountable_notification_message, disk.getDescription()); return buildNotificationBuilder(vol, title, text) - .setContentIntent(buildVolumeSettingsPendingIntent(vol)) + .setContentIntent(buildInitPendingIntent(vol)) .setCategory(Notification.CATEGORY_ERROR) .build(); } @@ -591,11 +591,11 @@ public class StorageNotification extends SystemUI { PendingIntent.FLAG_CANCEL_CURRENT, null, UserHandle.CURRENT); } - private PendingIntent buildSnoozeIntent(VolumeInfo vol) { + private PendingIntent buildSnoozeIntent(String fsUuid) { final Intent intent = new Intent(ACTION_SNOOZE_VOLUME); - intent.putExtra(VolumeRecord.EXTRA_FS_UUID, vol.getFsUuid()); + intent.putExtra(VolumeRecord.EXTRA_FS_UUID, fsUuid); - final int requestKey = vol.getId().hashCode(); + final int requestKey = fsUuid.hashCode(); return PendingIntent.getBroadcastAsUser(mContext, requestKey, intent, PendingIntent.FLAG_CANCEL_CURRENT, UserHandle.CURRENT); } |