Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +16 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import com.android.launcher3.logging.EventLogArray; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.model.AppLaunchTracker; import com.android.launcher3.provider.RestoreDbTask; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.LooperExecutor; import com.android.launcher3.util.UiThreadHelper; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -339,16 +340,25 @@ public class TouchInteractionService extends Service implements } private void initInputMonitor() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 1"); } if (!mMode.hasGestures || mISystemUiProxy == null) { return; } disposeEventHandlers(); if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 2"); } try { mInputMonitorCompat = InputMonitorCompat.fromBundle(mISystemUiProxy .monitorGestureInput("swipe-up", mDefaultDisplayId), KEY_EXTRA_INPUT_MONITOR); mInputEventReceiver = mInputMonitorCompat.getInputReceiver(Looper.getMainLooper(), mMainChoreographer, this::onInputEvent); if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 3"); } } catch (RemoteException e) { Log.e(TAG, "Unable to create input monitor", e); } Loading Loading @@ -406,6 +416,9 @@ public class TouchInteractionService extends Service implements @Override public void onNavigationModeChanged(Mode newMode) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "onNavigationModeChanged " + newMode); } if (mMode.hasGestures != newMode.hasGestures) { if (newMode.hasGestures) { getSystemService(DisplayManager.class).registerDisplayListener( Loading Loading @@ -515,6 +528,9 @@ public class TouchInteractionService extends Service implements } private void onInputEvent(InputEvent ev) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "onInputEvent " + ev); } if (!(ev instanceof MotionEvent)) { Log.e(TAG, "Unknown event " + ev); return; Loading quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class NavigationModeSwitchRule implements TestRule { return new Statement() { @Override public void evaluate() throws Throwable { mLauncher.enableDebugTracing(); final Context context = getInstrumentation().getContext(); final int currentInteractionMode = LauncherInstrumentation.getCurrentInteractionMode(context); Loading @@ -104,6 +105,7 @@ public class NavigationModeSwitchRule implements TestRule { } finally { setActiveOverlay(prevOverlayPkg, originalMode); } mLauncher.disableDebugTracing(); } public void evaluateWithoutChangingSetting(Statement base) throws Throwable { Loading src/com/android/launcher3/testing/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -77,4 +77,6 @@ public final class TestProtocol { public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing"; public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824"; } tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +8 −0 Original line number Diff line number Diff line Loading @@ -937,4 +937,12 @@ public final class LauncherInstrumentation { getContext().getSystemService(WindowManager.class).getDefaultDisplay().getRealSize(size); return size; } public void enableDebugTracing() { getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); } public void disableDebugTracing() { getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } } No newline at end of file Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +16 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ import com.android.launcher3.logging.EventLogArray; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.model.AppLaunchTracker; import com.android.launcher3.provider.RestoreDbTask; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.LooperExecutor; import com.android.launcher3.util.UiThreadHelper; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -339,16 +340,25 @@ public class TouchInteractionService extends Service implements } private void initInputMonitor() { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 1"); } if (!mMode.hasGestures || mISystemUiProxy == null) { return; } disposeEventHandlers(); if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 2"); } try { mInputMonitorCompat = InputMonitorCompat.fromBundle(mISystemUiProxy .monitorGestureInput("swipe-up", mDefaultDisplayId), KEY_EXTRA_INPUT_MONITOR); mInputEventReceiver = mInputMonitorCompat.getInputReceiver(Looper.getMainLooper(), mMainChoreographer, this::onInputEvent); if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "initInputMonitor 3"); } } catch (RemoteException e) { Log.e(TAG, "Unable to create input monitor", e); } Loading Loading @@ -406,6 +416,9 @@ public class TouchInteractionService extends Service implements @Override public void onNavigationModeChanged(Mode newMode) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "onNavigationModeChanged " + newMode); } if (mMode.hasGestures != newMode.hasGestures) { if (newMode.hasGestures) { getSystemService(DisplayManager.class).registerDisplayListener( Loading Loading @@ -515,6 +528,9 @@ public class TouchInteractionService extends Service implements } private void onInputEvent(InputEvent ev) { if (TestProtocol.sDebugTracing) { Log.d(TestProtocol.NO_BACKGROUND_TO_OVERVIEW_TAG, "onInputEvent " + ev); } if (!(ev instanceof MotionEvent)) { Log.e(TAG, "Unknown event " + ev); return; Loading
quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ public class NavigationModeSwitchRule implements TestRule { return new Statement() { @Override public void evaluate() throws Throwable { mLauncher.enableDebugTracing(); final Context context = getInstrumentation().getContext(); final int currentInteractionMode = LauncherInstrumentation.getCurrentInteractionMode(context); Loading @@ -104,6 +105,7 @@ public class NavigationModeSwitchRule implements TestRule { } finally { setActiveOverlay(prevOverlayPkg, originalMode); } mLauncher.disableDebugTracing(); } public void evaluateWithoutChangingSetting(Statement base) throws Throwable { Loading
src/com/android/launcher3/testing/TestProtocol.java +2 −0 Original line number Diff line number Diff line Loading @@ -77,4 +77,6 @@ public final class TestProtocol { public static boolean sDebugTracing = false; public static final String REQUEST_ENABLE_DEBUG_TRACING = "enable-debug-tracing"; public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing"; public static final String NO_BACKGROUND_TO_OVERVIEW_TAG = "b/138251824"; }
tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +8 −0 Original line number Diff line number Diff line Loading @@ -937,4 +937,12 @@ public final class LauncherInstrumentation { getContext().getSystemService(WindowManager.class).getDefaultDisplay().getRealSize(size); return size; } public void enableDebugTracing() { getTestInfo(TestProtocol.REQUEST_ENABLE_DEBUG_TRACING); } public void disableDebugTracing() { getTestInfo(TestProtocol.REQUEST_DISABLE_DEBUG_TRACING); } } No newline at end of file