summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2019-09-20 12:53:59 -0700
committer android-build-merger <android-build-merger@google.com> 2019-09-20 12:53:59 -0700
commitcb51b5045284a164f8846b6134f4fb1f3fe62b75 (patch)
tree286e296fc05c13ceb3015bee9ee60382956c4540
parenta564b7c585ce2239854fd061e0d7c7cdab29fb72 (diff)
parent62c0d7bc317a5002088f74dc6fca9408b4dd3ddf (diff)
Merge "Fixed an issue where the notification icons could overlap the clock" into qt-qpr1-dev
am: 62c0d7bc31 Change-Id: I9e641ca729d0464b733ab633f47e5c56f654f048
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
index ba3406999388..1a3560ece1d7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java
@@ -537,11 +537,7 @@ public class NotificationIconAreaController implements DarkReceiver,
if (dozeParameters.shouldControlScreenOff()) {
mAodIcons.setTranslationY(-mAodIconAppearTranslation);
mAodIcons.setAlpha(0);
- mAodIcons.animate()
- .setInterpolator(Interpolators.DECELERATE_QUINT)
- .translationY(0)
- .setDuration(AOD_ICONS_APPEAR_DURATION)
- .start();
+ animateInAodIconTranslation();
mAodIcons.animate()
.alpha(1)
.setInterpolator(Interpolators.LINEAR)
@@ -550,6 +546,14 @@ public class NotificationIconAreaController implements DarkReceiver,
}
}
+ private void animateInAodIconTranslation() {
+ mAodIcons.animate()
+ .setInterpolator(Interpolators.DECELERATE_QUINT)
+ .translationY(0)
+ .setDuration(AOD_ICONS_APPEAR_DURATION)
+ .start();
+ }
+
private void reloadAodColor() {
mAodIconTint = Utils.getColorAttrDefaultColor(mContext,
R.attr.wallpaperTextColor);
@@ -606,14 +610,19 @@ public class NotificationIconAreaController implements DarkReceiver,
mAodIcons.setAlpha(1.0f);
appearAodIcons();
} else {
+ // Let's make sure the icon are translated to 0, since we cancelled it above
+ animateInAodIconTranslation();
// We were fading out, let's fade in instead
CrossFadeHelper.fadeIn(mAodIcons);
}
} else {
+ // Let's make sure the icon are translated to 0, since we cancelled it above
+ animateInAodIconTranslation();
CrossFadeHelper.fadeOut(mAodIcons);
}
} else {
mAodIcons.setAlpha(1.0f);
+ mAodIcons.setTranslationY(0);
mAodIcons.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
}
}