Ensure media resumption controls have a title

This is a requirement stated in go/sysui-media-resumption-requirements
but was not actually being enforced.

Bug: 154823185
Test: manual
Change-Id: Iba10b37ff42733d8ef76faf14b90ed17877a1918
This commit is contained in:
Beth Thibodeau
2020-04-27 12:45:29 -04:00
parent 91c6dd813e
commit 52d9a561d2

View File

@@ -343,6 +343,11 @@ public class QSPanel extends LinearLayout implements Tunable, Callback, Brightne
return;
}
if (desc == null || desc.getTitle() == null) {
Log.e(TAG, "Description incomplete");
return;
}
Log.d(TAG, "adding track from browser: " + desc + ", " + component);
QSMediaPlayer player = new QSMediaPlayer(mContext, QSPanel.this,
null, mForegroundExecutor, mBackgroundExecutor, mActivityStarter);