Loading core/java/android/widget/MediaController.java +42 −32 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.widget; import android.content.Context; import android.content.res.Resources; import android.graphics.PixelFormat; import android.media.AudioManager; import android.os.Handler; Loading Loading @@ -96,6 +97,8 @@ public class MediaController extends FrameLayout { private ImageButton mRewButton; private ImageButton mNextButton; private ImageButton mPrevButton; private CharSequence mPlayDescription; private CharSequence mPauseDescription; public MediaController(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -249,6 +252,11 @@ public class MediaController extends FrameLayout { } private void initControllerView(View v) { Resources res = mContext.getResources(); mPlayDescription = res .getText(com.android.internal.R.string.lockscreen_transport_play_description); mPauseDescription = res .getText(com.android.internal.R.string.lockscreen_transport_pause_description); mPauseButton = (ImageButton) v.findViewById(com.android.internal.R.id.pause); if (mPauseButton != null) { mPauseButton.requestFocus(); Loading Loading @@ -525,8 +533,10 @@ public class MediaController extends FrameLayout { if (mPlayer.isPlaying()) { mPauseButton.setImageResource(com.android.internal.R.drawable.ic_media_pause); mPauseButton.setContentDescription(mPauseDescription); } else { mPauseButton.setImageResource(com.android.internal.R.drawable.ic_media_play); mPauseButton.setContentDescription(mPlayDescription); } } Loading core/res/res/values/strings.xml +9 −5 Original line number Diff line number Diff line Loading @@ -2540,15 +2540,19 @@ Contact your wireless service provider for another SIM card.</string> <!-- Shown on transport control of lockscreen. Pressing button goes to previous track. --> <string name="lockscreen_transport_prev_description">Previous track button</string> <string name="lockscreen_transport_prev_description">Previous track</string> <!-- Shown on transport control of lockscreen. Pressing button goes to next track. --> <string name="lockscreen_transport_next_description">Next track button</string> <string name="lockscreen_transport_next_description">Next track</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_pause_description">Pause button</string> <string name="lockscreen_transport_pause_description">Pause</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_play_description">Play button</string> <string name="lockscreen_transport_play_description">Play</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_stop_description">Stop button</string> <string name="lockscreen_transport_stop_description">Stop</string> <!-- Shown on transport control screens. Pressing button rewinds playback [CHAR LIMIT=NONE]--> <string name="lockscreen_transport_rew_description">Rewind</string> <!-- Shown on transport control screens. Pressing button fast forwards playback [CHAR LIMIT=NONE]--> <string name="lockscreen_transport_ffw_description">Fast forward</string> <!-- Shown in the lock screen when there is emergency calls only mode. --> <string name="emergency_calls_only" msgid="2485604591272668370">Emergency calls only</string> Loading core/res/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1105,26 +1105,32 @@ please see styles_device_defaults.xml. <style name="MediaButton.Previous"> <item name="src">@drawable/ic_media_previous</item> <item name="contentDescription">@string/lockscreen_transport_prev_description</item> </style> <style name="MediaButton.Next"> <item name="src">@drawable/ic_media_next</item> <item name="contentDescription">@string/lockscreen_transport_next_description</item> </style> <style name="MediaButton.Play"> <item name="src">@drawable/ic_media_play</item> <item name="contentDescription">@string/lockscreen_transport_play_description</item> </style> <style name="MediaButton.Ffwd"> <item name="src">@drawable/ic_media_ff</item> <item name="contentDescription">@string/lockscreen_transport_ffw_description</item> </style> <style name="MediaButton.Rew"> <item name="src">@drawable/ic_media_rew</item> <item name="contentDescription">@string/lockscreen_transport_rew_description</item> </style> <style name="MediaButton.Pause"> <item name="src">@drawable/ic_media_pause</item> <item name="contentDescription">@string/lockscreen_transport_pause_description</item> </style> <style name="ZoomControls"> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -976,6 +976,8 @@ <java-symbol type="string" name="ssl_ca_cert_noti_by_unknown" /> <java-symbol type="string" name="ssl_ca_cert_noti_managed" /> <java-symbol type="string" name="ssl_ca_cert_warning" /> <java-symbol type="string" name="lockscreen_transport_play_description" /> <java-symbol type="string" name="lockscreen_transport_pause_description" /> <java-symbol type="plurals" name="abbrev_in_num_days" /> <java-symbol type="plurals" name="abbrev_in_num_hours" /> Loading Loading
core/java/android/widget/MediaController.java +42 −32 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.widget; import android.content.Context; import android.content.res.Resources; import android.graphics.PixelFormat; import android.media.AudioManager; import android.os.Handler; Loading Loading @@ -96,6 +97,8 @@ public class MediaController extends FrameLayout { private ImageButton mRewButton; private ImageButton mNextButton; private ImageButton mPrevButton; private CharSequence mPlayDescription; private CharSequence mPauseDescription; public MediaController(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -249,6 +252,11 @@ public class MediaController extends FrameLayout { } private void initControllerView(View v) { Resources res = mContext.getResources(); mPlayDescription = res .getText(com.android.internal.R.string.lockscreen_transport_play_description); mPauseDescription = res .getText(com.android.internal.R.string.lockscreen_transport_pause_description); mPauseButton = (ImageButton) v.findViewById(com.android.internal.R.id.pause); if (mPauseButton != null) { mPauseButton.requestFocus(); Loading Loading @@ -525,8 +533,10 @@ public class MediaController extends FrameLayout { if (mPlayer.isPlaying()) { mPauseButton.setImageResource(com.android.internal.R.drawable.ic_media_pause); mPauseButton.setContentDescription(mPauseDescription); } else { mPauseButton.setImageResource(com.android.internal.R.drawable.ic_media_play); mPauseButton.setContentDescription(mPlayDescription); } } Loading
core/res/res/values/strings.xml +9 −5 Original line number Diff line number Diff line Loading @@ -2540,15 +2540,19 @@ Contact your wireless service provider for another SIM card.</string> <!-- Shown on transport control of lockscreen. Pressing button goes to previous track. --> <string name="lockscreen_transport_prev_description">Previous track button</string> <string name="lockscreen_transport_prev_description">Previous track</string> <!-- Shown on transport control of lockscreen. Pressing button goes to next track. --> <string name="lockscreen_transport_next_description">Next track button</string> <string name="lockscreen_transport_next_description">Next track</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_pause_description">Pause button</string> <string name="lockscreen_transport_pause_description">Pause</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_play_description">Play button</string> <string name="lockscreen_transport_play_description">Play</string> <!-- Shown on transport control of lockscreen. Pressing button pauses playback --> <string name="lockscreen_transport_stop_description">Stop button</string> <string name="lockscreen_transport_stop_description">Stop</string> <!-- Shown on transport control screens. Pressing button rewinds playback [CHAR LIMIT=NONE]--> <string name="lockscreen_transport_rew_description">Rewind</string> <!-- Shown on transport control screens. Pressing button fast forwards playback [CHAR LIMIT=NONE]--> <string name="lockscreen_transport_ffw_description">Fast forward</string> <!-- Shown in the lock screen when there is emergency calls only mode. --> <string name="emergency_calls_only" msgid="2485604591272668370">Emergency calls only</string> Loading
core/res/res/values/styles.xml +6 −0 Original line number Diff line number Diff line Loading @@ -1105,26 +1105,32 @@ please see styles_device_defaults.xml. <style name="MediaButton.Previous"> <item name="src">@drawable/ic_media_previous</item> <item name="contentDescription">@string/lockscreen_transport_prev_description</item> </style> <style name="MediaButton.Next"> <item name="src">@drawable/ic_media_next</item> <item name="contentDescription">@string/lockscreen_transport_next_description</item> </style> <style name="MediaButton.Play"> <item name="src">@drawable/ic_media_play</item> <item name="contentDescription">@string/lockscreen_transport_play_description</item> </style> <style name="MediaButton.Ffwd"> <item name="src">@drawable/ic_media_ff</item> <item name="contentDescription">@string/lockscreen_transport_ffw_description</item> </style> <style name="MediaButton.Rew"> <item name="src">@drawable/ic_media_rew</item> <item name="contentDescription">@string/lockscreen_transport_rew_description</item> </style> <style name="MediaButton.Pause"> <item name="src">@drawable/ic_media_pause</item> <item name="contentDescription">@string/lockscreen_transport_pause_description</item> </style> <style name="ZoomControls"> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -976,6 +976,8 @@ <java-symbol type="string" name="ssl_ca_cert_noti_by_unknown" /> <java-symbol type="string" name="ssl_ca_cert_noti_managed" /> <java-symbol type="string" name="ssl_ca_cert_warning" /> <java-symbol type="string" name="lockscreen_transport_play_description" /> <java-symbol type="string" name="lockscreen_transport_pause_description" /> <java-symbol type="plurals" name="abbrev_in_num_days" /> <java-symbol type="plurals" name="abbrev_in_num_hours" /> Loading