AOD: Do not animate notification icons while dozing
Uses power, and gets icons stuck mid-animation once the
device enters low-power state on AOD.
Change-Id: Iba354bd24eac0a8327890374ea537236256e993d
Fixes: 63388065
Test: Initiate download, go to AOD. Observe whether icon animates or not.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index 89694b33..05d47ec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -756,9 +756,16 @@
updateIconScale();
updateDecorColor();
updateIconColor();
+ updateAllowAnimation();
}, dark, fade, delay);
}
+ private void updateAllowAnimation() {
+ if (mDarkAmount == 0 || mDarkAmount == 1) {
+ setAllowAnimation(mDarkAmount == 0);
+ }
+ }
+
public interface OnVisibilityChangedListener {
void onVisibilityChanged(int newVisibility);
}