Skip to content

Commit

Permalink
Disable Lockscreen Media Art [1/2]
Browse files Browse the repository at this point in the history
* toggle to choose whether or not to show album art/media art on lockscreen

Special thanks to @atl4tis from Cataclysm rom for pointing out where to hook into this

Change-Id: I3afe8f12be43c22b77f666b8d6a53b3bba08cf83
  • Loading branch information
Beanstown authored and xlxfoxxlx committed Jun 21, 2017
1 parent 8747c6a commit 835a89b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core/java/android/provider/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3754,6 +3754,12 @@ public boolean validate(String value) {
public static final String VOLBTN_MUSIC_CONTROLS = "volbtn_music_controls";

/**
* Whether to show media art on lockscreen
* @hide
*/
public static final String LOCKSCREEN_MEDIA_METADATA = "lockscreen_media_metadata";

/**
* Whether the phone volume up / down effect should be played
* @hide
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,8 @@ public void updateMediaMetaData(boolean metaDataChanged, boolean allowEnterAnima
}

Drawable artworkDrawable = null;
if (mMediaMetadata != null) {
if (mMediaMetadata != null && (Settings.System.getIntForUser(mContext.getContentResolver(),
Settings.System.LOCKSCREEN_MEDIA_METADATA, 1, UserHandle.USER_CURRENT) == 1)) {
Bitmap artworkBitmap = null;
artworkBitmap = mMediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ART);
if (artworkBitmap == null) {
Expand Down

0 comments on commit 835a89b

Please sign in to comment.