mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Merge pull request #7304 from AChep:patch-1
PiperOrigin-RevId: 309395364
This commit is contained in:
parent
2fa2fb73b7
commit
01ff17f3e7
1 changed files with 1 additions and 6 deletions
|
|
@ -195,7 +195,6 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||||
private final Formatter formatter;
|
private final Formatter formatter;
|
||||||
private final Runnable stopScrubbingRunnable;
|
private final Runnable stopScrubbingRunnable;
|
||||||
private final CopyOnWriteArraySet<OnScrubListener> listeners;
|
private final CopyOnWriteArraySet<OnScrubListener> listeners;
|
||||||
private final int[] locationOnScreen;
|
|
||||||
private final Point touchPosition;
|
private final Point touchPosition;
|
||||||
private final float density;
|
private final float density;
|
||||||
|
|
||||||
|
|
@ -249,7 +248,6 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||||
scrubberPaint = new Paint();
|
scrubberPaint = new Paint();
|
||||||
scrubberPaint.setAntiAlias(true);
|
scrubberPaint.setAntiAlias(true);
|
||||||
listeners = new CopyOnWriteArraySet<>();
|
listeners = new CopyOnWriteArraySet<>();
|
||||||
locationOnScreen = new int[2];
|
|
||||||
touchPosition = new Point();
|
touchPosition = new Point();
|
||||||
|
|
||||||
// Calculate the dimensions and paints for drawn elements.
|
// Calculate the dimensions and paints for drawn elements.
|
||||||
|
|
@ -755,10 +753,7 @@ public class DefaultTimeBar extends View implements TimeBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Point resolveRelativeTouchPosition(MotionEvent motionEvent) {
|
private Point resolveRelativeTouchPosition(MotionEvent motionEvent) {
|
||||||
getLocationOnScreen(locationOnScreen);
|
touchPosition.set((int) motionEvent.getX(), (int) motionEvent.getY());
|
||||||
touchPosition.set(
|
|
||||||
((int) motionEvent.getRawX()) - locationOnScreen[0],
|
|
||||||
((int) motionEvent.getRawY()) - locationOnScreen[1]);
|
|
||||||
return touchPosition;
|
return touchPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue