Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31747c8c authored by vadimt's avatar vadimt Committed by android-build-merger
Browse files

Fixing icon dragging

am: b3e2cd3d

Change-Id: I979006064939699e82bf3b4bdcd34b2073124497
parents c4c800ff b3e2cd3d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -598,11 +598,12 @@ public final class LauncherInstrumentation {

    void movePointer(long downTime, long duration, Point from, Point to) {
        final Point point = new Point();
        final long startTime = SystemClock.uptimeMillis();
        for (; ; ) {
            sleep(16);

            final long currentTime = SystemClock.uptimeMillis();
            final float progress = (currentTime - downTime) / (float) duration;
            final float progress = (currentTime - startTime) / (float) duration;
            if (progress > 1) return;

            point.x = from.x + (int) (progress * (to.x - from.x));