diff options
| author | Alan Viverette <alanv@google.com> | 2017-01-27 11:29:02 -0500 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2017-01-27 13:13:45 -0500 |
| commit | 06c2fffdaa81544522de751846754f781a9970a9 (patch) | |
| tree | b3158dcc9fb6a16ba19151a8acba2d79c0c2fa87 /core/java/android/widget/MediaController.java | |
| parent | df9a4f9a7c599ccd2348d429e6a6f0a5a415f780 (diff) | |
Implicitly cast views obtained via View.findView methods
Removes all explicit casts from android.widget classes. Also @removes
methods on ListView that were overriding @hidden methods and should
never have been exposed as public API.
Bug: 24137209
Test: make
Change-Id: I6ccfc6f001b355c4880f2b54e1a5474df78d6228
Diffstat (limited to 'core/java/android/widget/MediaController.java')
| -rw-r--r-- | core/java/android/widget/MediaController.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/java/android/widget/MediaController.java b/core/java/android/widget/MediaController.java index 80086374ebd3..8e04f1cd9f5b 100644 --- a/core/java/android/widget/MediaController.java +++ b/core/java/android/widget/MediaController.java @@ -257,13 +257,13 @@ public class MediaController extends FrameLayout { .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); + mPauseButton = v.findViewById(com.android.internal.R.id.pause); if (mPauseButton != null) { mPauseButton.requestFocus(); mPauseButton.setOnClickListener(mPauseListener); } - mFfwdButton = (ImageButton) v.findViewById(com.android.internal.R.id.ffwd); + mFfwdButton = v.findViewById(com.android.internal.R.id.ffwd); if (mFfwdButton != null) { mFfwdButton.setOnClickListener(mFfwdListener); if (!mFromXml) { @@ -271,7 +271,7 @@ public class MediaController extends FrameLayout { } } - mRewButton = (ImageButton) v.findViewById(com.android.internal.R.id.rew); + mRewButton = v.findViewById(com.android.internal.R.id.rew); if (mRewButton != null) { mRewButton.setOnClickListener(mRewListener); if (!mFromXml) { @@ -280,16 +280,16 @@ public class MediaController extends FrameLayout { } // By default these are hidden. They will be enabled when setPrevNextListeners() is called - mNextButton = (ImageButton) v.findViewById(com.android.internal.R.id.next); + mNextButton = v.findViewById(com.android.internal.R.id.next); if (mNextButton != null && !mFromXml && !mListenersSet) { mNextButton.setVisibility(View.GONE); } - mPrevButton = (ImageButton) v.findViewById(com.android.internal.R.id.prev); + mPrevButton = v.findViewById(com.android.internal.R.id.prev); if (mPrevButton != null && !mFromXml && !mListenersSet) { mPrevButton.setVisibility(View.GONE); } - mProgress = (ProgressBar) v.findViewById(com.android.internal.R.id.mediacontroller_progress); + mProgress = v.findViewById(com.android.internal.R.id.mediacontroller_progress); if (mProgress != null) { if (mProgress instanceof SeekBar) { SeekBar seeker = (SeekBar) mProgress; @@ -298,8 +298,8 @@ public class MediaController extends FrameLayout { mProgress.setMax(1000); } - mEndTime = (TextView) v.findViewById(com.android.internal.R.id.time); - mCurrentTime = (TextView) v.findViewById(com.android.internal.R.id.time_current); + mEndTime = v.findViewById(com.android.internal.R.id.time); + mCurrentTime = v.findViewById(com.android.internal.R.id.time_current); mFormatBuilder = new StringBuilder(); mFormatter = new Formatter(mFormatBuilder, Locale.getDefault()); |
