From 261381cf9f52776f5f5fad8e6d2d31960c60c945 Mon Sep 17 00:00:00 2001 From: Jean-Michel Trivi Date: Thu, 13 Oct 2011 16:53:08 -0700 Subject: 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 --- core/java/com/android/internal/widget/TransportControlView.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core') diff --git a/core/java/com/android/internal/widget/TransportControlView.java b/core/java/com/android/internal/widget/TransportControlView.java index 73d9f10..8f6f839 100644 --- a/core/java/com/android/internal/widget/TransportControlView.java +++ b/core/java/com/android/internal/widget/TransportControlView.java @@ -339,6 +339,13 @@ public class TransportControlView extends FrameLayout implements OnClickListener final int imageResId; final int imageDescId; switch (state) { + case RemoteControlClient.PLAYSTATE_ERROR: + imageResId = com.android.internal.R.drawable.stat_sys_warning; + // TODO use more specific image description string for warning, but here the "play" + // message is still valid because this button triggers a play command. + imageDescId = com.android.internal.R.string.lockscreen_transport_play_description; + break; + case RemoteControlClient.PLAYSTATE_PLAYING: imageResId = com.android.internal.R.drawable.ic_media_pause; imageDescId = com.android.internal.R.string.lockscreen_transport_pause_description; -- cgit v1.1