Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2861d6fe authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Ringlock: hide album art when Minimal style is active" into gingerbread

parents 76872df1 7f8e413f
Loading
Loading
Loading
Loading
+22 −5
Original line number Diff line number Diff line
@@ -1141,14 +1141,31 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
                mNowPlaying.setSelected(true); // set focus to TextView to allow scrolling
            }
            // Set album art
            if (shouldShowAlbumArt()) {
                Uri uri = getArtworkUri(getContext(), KeyguardViewMediator.SongId(),
                        KeyguardViewMediator.AlbumId());
            if (uri != null && mAlbumArtToggle && !(mUseRingLockscreen && mCustomAppToggle && !mHideUnlockTab)) {
                if (uri != null) {
                    mAlbumArt.setImageURI(uri);
                    mAlbumArt.setVisibility(View.VISIBLE);
                }
            }
        }
    }

    private boolean shouldShowAlbumArt() {
        if (!mAlbumArtToggle) {
            return false;
        }
        if (mHideUnlockTab) {
            return false;
        }
        if (mUseRingLockscreen) {
            if (mCustomAppToggle || mRingMinimal) {
                return false;
            }
        }
        return true;
    }

    private void sendMediaButtonEvent(int code) {
        long eventtime = SystemClock.uptimeMillis();