From e12d344b61999cd4e9befbd1b369b9122224c4cf Mon Sep 17 00:00:00 2001 From: Fengjiang Li Date: Fri, 14 Apr 2023 11:27:16 -0700 Subject: [PATCH] Format switch case block of TouchInteractionService so that future change is not blocked by lint Test: test launching app Bug: 278092752 Change-Id: I6d3be682d653f7378bb4c9ce4b6a1048e49386dc --- .../android/quickstep/TouchInteractionService.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 1cf682bffc..89920f0b03 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -81,7 +81,6 @@ import com.android.launcher3.LauncherPrefs; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatedFloat; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.provider.RestoreDbTask; import com.android.launcher3.statehandlers.DesktopVisibilityController; import com.android.launcher3.statemanager.StatefulActivity; @@ -678,7 +677,9 @@ public class TouchInteractionService extends Service if (mUncheckedConsumer != InputConsumer.NO_OP) { switch (event.getActionMasked()) { - case ACTION_DOWN, ACTION_UP -> + case ACTION_DOWN: + // fall through + case ACTION_UP: ActiveGestureLog.INSTANCE.addLog( /* event= */ "onMotionEvent(" + (int) event.getRawX() + ", " + (int) event.getRawY() + "): " @@ -687,15 +688,18 @@ public class TouchInteractionService extends Service /* gestureEvent= */ event.getActionMasked() == ACTION_DOWN ? MOTION_DOWN : MOTION_UP); - case ACTION_MOVE -> + break; + case ACTION_MOVE: ActiveGestureLog.INSTANCE.addLog("onMotionEvent: " + MotionEvent.actionToString(event.getActionMasked()) + "," + MotionEvent.classificationToString(event.getClassification()) + ", pointerCount: " + event.getPointerCount(), MOTION_MOVE); - default -> + break; + default: { ActiveGestureLog.INSTANCE.addLog("onMotionEvent: " + MotionEvent.actionToString(event.getActionMasked()) + "," + MotionEvent.classificationToString(event.getClassification())); + } } }