Skip to content

Commit 261381c

Browse files
committed
Fix 5380695 Lockscreen transport control must reflect error state
When a RemoteControlClient reports an error for its playstate, make the play/pause button display the warning platform icon. Note that a specific image description is not available for this state at this time, but the one being used (the same as for the play icon) is valid as it correctly describes the action the button performs. Change-Id: I59aadab3fe5bcc09a2f7be0b9e4cffb0c500e865
1 parent 0c265c8 commit 261381c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

core/java/com/android/internal/widget/TransportControlView.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,13 @@ private void updatePlayPauseState(int state) {
339339
final int imageResId;
340340
final int imageDescId;
341341
switch (state) {
342+
case RemoteControlClient.PLAYSTATE_ERROR:
343+
imageResId = com.android.internal.R.drawable.stat_sys_warning;
344+
// TODO use more specific image description string for warning, but here the "play"
345+
// message is still valid because this button triggers a play command.
346+
imageDescId = com.android.internal.R.string.lockscreen_transport_play_description;
347+
break;
348+
342349
case RemoteControlClient.PLAYSTATE_PLAYING:
343350
imageResId = com.android.internal.R.drawable.ic_media_pause;
344351
imageDescId = com.android.internal.R.string.lockscreen_transport_pause_description;

0 commit comments

Comments
 (0)