Loading quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +1 −2 Original line number Diff line number Diff line Loading @@ -210,8 +210,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe // Optimization, hide the all apps view to prevent layout while initializing activity.getAppsView().getContentView().setVisibility(View.GONE); AccessibilityManagerCompat.sendEventToTest( activity, TestProtocol.SWITCHED_TO_STATE_MESSAGE); AccessibilityManagerCompat.sendStateEventToTest(activity, fromState.ordinal); } else { fromState = startState; } Loading src/com/android/launcher3/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ package com.android.launcher3; public final class TestProtocol { public static final String GET_SCROLL_MESSAGE = "TAPL_GET_SCROLL"; public static final String SCROLL_Y_FIELD = "scrollY"; public static final String STATE_FIELD = "state"; public static final String SWITCHED_TO_STATE_MESSAGE = "TAPL_SWITCHED_TO_STATE"; public static final String RESPONSE_MESSAGE_POSTFIX = "_RESPONSE"; } src/com/android/launcher3/compat/AccessibilityManagerCompat.java +5 −2 Original line number Diff line number Diff line Loading @@ -52,11 +52,14 @@ public class AccessibilityManagerCompat { return (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); } public static void sendEventToTest(Context context, String eventTag) { public static void sendStateEventToTest(Context context, int stateOrdinal) { final AccessibilityManager accessibilityManager = getAccessibilityManagerForTest(context); if (accessibilityManager == null) return; sendEventToTest(accessibilityManager, eventTag, null); final Bundle parcel = new Bundle(); parcel.putInt(TestProtocol.STATE_FIELD, stateOrdinal); sendEventToTest(accessibilityManager, TestProtocol.SWITCHED_TO_STATE_MESSAGE, parcel); } private static void sendEventToTest( Loading src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -522,8 +522,7 @@ public abstract class AbstractStateChangeTouchController } mLauncher.getStateManager().goToState(targetState, false /* animated */); AccessibilityManagerCompat.sendEventToTest( mLauncher, TestProtocol.SWITCHED_TO_STATE_MESSAGE); AccessibilityManagerCompat.sendStateEventToTest(mLauncher, targetState.ordinal); } } Loading tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ public final class AllAppsFromOverview extends AllApps { final Point start = qsb.getVisibleCenter(); final int endY = (int) (mLauncher.getDevice().getDisplayHeight() * 0.6); LauncherInstrumentation.log("AllAppsFromOverview.switchBackToOverview before swipe"); mLauncher.swipe(start.x, start.y, start.x, endY); mLauncher.swipe( start.x, start.y, start.x, endY, LauncherInstrumentation.OVERVIEW_STATE_ORDINAL); return new Overview(mLauncher); } Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java +1 −2 Original line number Diff line number Diff line Loading @@ -210,8 +210,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe // Optimization, hide the all apps view to prevent layout while initializing activity.getAppsView().getContentView().setVisibility(View.GONE); AccessibilityManagerCompat.sendEventToTest( activity, TestProtocol.SWITCHED_TO_STATE_MESSAGE); AccessibilityManagerCompat.sendStateEventToTest(activity, fromState.ordinal); } else { fromState = startState; } Loading
src/com/android/launcher3/TestProtocol.java +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ package com.android.launcher3; public final class TestProtocol { public static final String GET_SCROLL_MESSAGE = "TAPL_GET_SCROLL"; public static final String SCROLL_Y_FIELD = "scrollY"; public static final String STATE_FIELD = "state"; public static final String SWITCHED_TO_STATE_MESSAGE = "TAPL_SWITCHED_TO_STATE"; public static final String RESPONSE_MESSAGE_POSTFIX = "_RESPONSE"; }
src/com/android/launcher3/compat/AccessibilityManagerCompat.java +5 −2 Original line number Diff line number Diff line Loading @@ -52,11 +52,14 @@ public class AccessibilityManagerCompat { return (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); } public static void sendEventToTest(Context context, String eventTag) { public static void sendStateEventToTest(Context context, int stateOrdinal) { final AccessibilityManager accessibilityManager = getAccessibilityManagerForTest(context); if (accessibilityManager == null) return; sendEventToTest(accessibilityManager, eventTag, null); final Bundle parcel = new Bundle(); parcel.putInt(TestProtocol.STATE_FIELD, stateOrdinal); sendEventToTest(accessibilityManager, TestProtocol.SWITCHED_TO_STATE_MESSAGE, parcel); } private static void sendEventToTest( Loading
src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +1 −2 Original line number Diff line number Diff line Loading @@ -522,8 +522,7 @@ public abstract class AbstractStateChangeTouchController } mLauncher.getStateManager().goToState(targetState, false /* animated */); AccessibilityManagerCompat.sendEventToTest( mLauncher, TestProtocol.SWITCHED_TO_STATE_MESSAGE); AccessibilityManagerCompat.sendStateEventToTest(mLauncher, targetState.ordinal); } } Loading
tests/tapl/com/android/launcher3/tapl/AllAppsFromOverview.java +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ public final class AllAppsFromOverview extends AllApps { final Point start = qsb.getVisibleCenter(); final int endY = (int) (mLauncher.getDevice().getDisplayHeight() * 0.6); LauncherInstrumentation.log("AllAppsFromOverview.switchBackToOverview before swipe"); mLauncher.swipe(start.x, start.y, start.x, endY); mLauncher.swipe( start.x, start.y, start.x, endY, LauncherInstrumentation.OVERVIEW_STATE_ORDINAL); return new Overview(mLauncher); } Loading