Don't crash if media metadata isn't available

Bug: 150454272
Test: manual - play music and look at lock screen
Change-Id: I5e776d8fc37c1f8894621be23a1ec99afa77bd11
This commit is contained in:
Robert Snoeberger
2020-03-24 17:49:36 -04:00
parent 5430412662
commit d71a77f2bb

View File

@@ -114,7 +114,9 @@ public class KeyguardMediaPlayer {
throw new IllegalStateException("cannot update controls, views not bound");
}
if (mediaMetadata == null) {
throw new IllegalArgumentException("media metadata was null");
mMediaNotifView.setVisibility(View.GONE);
Log.d(TAG, "media metadata was null");
return;
}
mMediaNotifView.setVisibility(View.VISIBLE);