OSDN Git Service

Don't show album art on AOD
authorLucas Dupin <dupin@google.com>
Thu, 11 Jan 2018 19:48:44 +0000 (11:48 -0800)
committerLucas Dupin <dupin@google.com>
Sun, 14 Jan 2018 01:52:18 +0000 (17:52 -0800)
Fixes: 71767554
Test: Set AOD wallpaper, play media, look at AOD
Change-Id: I8f53b1738cc18ecf07c69cfa193d80c6729593e0

packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java

index 2da1e4d..bc5440d 100644 (file)
@@ -1596,7 +1596,7 @@ public class StatusBar extends SystemUI implements DemoMode,
 
         final boolean hasArtwork = artworkDrawable != null;
 
-        if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK)
+        if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK) && !mDozing
                 && (mState != StatusBarState.SHADE || allowWhenShade)
                 && mFingerprintUnlockController.getMode()
                         != FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING
@@ -1657,15 +1657,16 @@ public class StatusBar extends SystemUI implements DemoMode,
                 }
             }
         } else {
-            // need to hide the album art, either because we are unlocked or because
-            // the metadata isn't there to support it
+            // need to hide the album art, either because we are unlocked, on AOD
+            // or because the metadata isn't there to support it
             if (mBackdrop.getVisibility() != View.GONE) {
                 if (DEBUG_MEDIA) {
                     Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork");
                 }
+                boolean cannotAnimateDoze = mDozing && !ScrimState.AOD.getAnimateChange();
                 if (mFingerprintUnlockController.getMode()
                         == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING
-                        || hideBecauseOccluded) {
+                        || hideBecauseOccluded || cannotAnimateDoze) {
 
                     // We are unlocking directly - no animation!
                     mBackdrop.setVisibility(View.GONE);