Loading ext_tests/src/com/android/launcher3/testing/DebugTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class DebugTestInformationHandler extends TestInformationHandler { } @Override public Bundle call(String method) { public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_APP_LIST_FREEZE_FLAGS: { Loading Loading @@ -161,7 +161,7 @@ public class DebugTestInformationHandler extends TestInformationHandler { } default: return super.call(method); return super.call(method, arg); } } } quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } @Override public Bundle call(String method) { public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_ALL_APPS_TO_OVERVIEW_SWIPE_HEIGHT: { Loading Loading @@ -66,7 +66,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } } return super.call(method); return super.call(method, arg); } @Override Loading quickstep/src/com/android/quickstep/util/MotionPauseDetector.java +4 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.VelocityTracker; import com.android.launcher3.Alarm; import com.android.launcher3.R; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.testing.TestProtocol; /** * Given positions along x- or y-axis, tracks velocity and acceleration and determines when there is Loading Loading @@ -118,9 +119,9 @@ public class MotionPauseDetector { * @param pointerIndex Index for the pointer being tracked in the motion event */ public void addPosition(MotionEvent ev, int pointerIndex) { mForcePauseTimeout.setAlarm(mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT); mForcePauseTimeout.setAlarm(TestProtocol.sForcePauseTimeout != null ? TestProtocol.sForcePauseTimeout : mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT); float newVelocity = mVelocityProvider.addMotionEvent(ev, ev.getPointerId(pointerIndex)); if (mPreviousVelocity != null) { checkMotionPaused(newVelocity, mPreviousVelocity, ev.getEventTime()); Loading src/com/android/launcher3/testing/TestInformationHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ public class TestInformationHandler implements ResourceBasedOverride { } public Bundle call(String method) { return call(method, /*arg=*/ null); } public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT: { Loading Loading @@ -129,6 +133,10 @@ public class TestInformationHandler implements ResourceBasedOverride { mDeviceProfile.isTwoPanels); return response; case TestProtocol.REQUEST_SET_FORCE_PAUSE_TIMEOUT: TestProtocol.sForcePauseTimeout = Long.parseLong(arg); return response; default: return null; } Loading src/com/android/launcher3/testing/TestInformationProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class TestInformationProvider extends ContentProvider { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { TestInformationHandler handler = TestInformationHandler.newInstance(getContext()); handler.init(getContext()); return handler.call(method); return handler.call(method, arg); } return null; } Loading Loading
ext_tests/src/com/android/launcher3/testing/DebugTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public class DebugTestInformationHandler extends TestInformationHandler { } @Override public Bundle call(String method) { public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_APP_LIST_FREEZE_FLAGS: { Loading Loading @@ -161,7 +161,7 @@ public class DebugTestInformationHandler extends TestInformationHandler { } default: return super.call(method); return super.call(method, arg); } } }
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } @Override public Bundle call(String method) { public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_ALL_APPS_TO_OVERVIEW_SWIPE_HEIGHT: { Loading Loading @@ -66,7 +66,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } } return super.call(method); return super.call(method, arg); } @Override Loading
quickstep/src/com/android/quickstep/util/MotionPauseDetector.java +4 −3 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.view.VelocityTracker; import com.android.launcher3.Alarm; import com.android.launcher3.R; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.testing.TestProtocol; /** * Given positions along x- or y-axis, tracks velocity and acceleration and determines when there is Loading Loading @@ -118,9 +119,9 @@ public class MotionPauseDetector { * @param pointerIndex Index for the pointer being tracked in the motion event */ public void addPosition(MotionEvent ev, int pointerIndex) { mForcePauseTimeout.setAlarm(mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT); mForcePauseTimeout.setAlarm(TestProtocol.sForcePauseTimeout != null ? TestProtocol.sForcePauseTimeout : mMakePauseHarderToTrigger ? HARDER_TRIGGER_TIMEOUT : FORCE_PAUSE_TIMEOUT); float newVelocity = mVelocityProvider.addMotionEvent(ev, ev.getPointerId(pointerIndex)); if (mPreviousVelocity != null) { checkMotionPaused(newVelocity, mPreviousVelocity, ev.getEventTime()); Loading
src/com/android/launcher3/testing/TestInformationHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ public class TestInformationHandler implements ResourceBasedOverride { } public Bundle call(String method) { return call(method, /*arg=*/ null); } public Bundle call(String method, String arg) { final Bundle response = new Bundle(); switch (method) { case TestProtocol.REQUEST_HOME_TO_ALL_APPS_SWIPE_HEIGHT: { Loading Loading @@ -129,6 +133,10 @@ public class TestInformationHandler implements ResourceBasedOverride { mDeviceProfile.isTwoPanels); return response; case TestProtocol.REQUEST_SET_FORCE_PAUSE_TIMEOUT: TestProtocol.sForcePauseTimeout = Long.parseLong(arg); return response; default: return null; } Loading
src/com/android/launcher3/testing/TestInformationProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ public class TestInformationProvider extends ContentProvider { if (Utilities.IS_RUNNING_IN_TEST_HARNESS) { TestInformationHandler handler = TestInformationHandler.newInstance(getContext()); handler.init(getContext()); return handler.call(method); return handler.call(method, arg); } return null; } Loading