Expose current scrubber position through onScrubStart

Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
This commit is contained in:
olly 2017-06-06 09:29:24 -07:00 committed by Oliver Woodman
parent 1ac8420b7f
commit fb7cb507ea
3 changed files with 4 additions and 3 deletions

View File

@ -442,7 +442,7 @@ public class DefaultTimeBar extends View implements TimeBar {
parent.requestDisallowInterceptTouchEvent(true); parent.requestDisallowInterceptTouchEvent(true);
} }
if (listener != null) { if (listener != null) {
listener.onScrubStart(this); listener.onScrubStart(this, getScrubberPosition());
} }
} }

View File

@ -875,7 +875,7 @@ public class PlaybackControlView extends FrameLayout {
OnClickListener { OnClickListener {
@Override @Override
public void onScrubStart(TimeBar timeBar) { public void onScrubStart(TimeBar timeBar, long position) {
removeCallbacks(hideAction); removeCallbacks(hideAction);
scrubbing = true; scrubbing = true;
} }

View File

@ -95,8 +95,9 @@ public interface TimeBar {
* Called when the user starts moving the scrubber. * Called when the user starts moving the scrubber.
* *
* @param timeBar The time bar. * @param timeBar The time bar.
* @param position The position of the scrubber, in milliseconds.
*/ */
void onScrubStart(TimeBar timeBar); void onScrubStart(TimeBar timeBar, long position);
/** /**
* Called when the user moves the scrubber. * Called when the user moves the scrubber.