Commit 39b1c85c by olly Committed by Oliver Woodman

Expose current scrubber position through onScrubStart

Issue: #2910

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=158149904
parent 1316445c
...@@ -442,7 +442,7 @@ public class DefaultTimeBar extends View implements TimeBar { ...@@ -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());
} }
} }
......
...@@ -1045,7 +1045,7 @@ public class PlaybackControlView extends FrameLayout { ...@@ -1045,7 +1045,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;
} }
......
...@@ -95,8 +95,9 @@ public interface TimeBar { ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment