diff --git a/libs/WindowManager/Shell/Android.bp b/libs/WindowManager/Shell/Android.bp index 16b87c43fc584..1591b06162627 100644 --- a/libs/WindowManager/Shell/Android.bp +++ b/libs/WindowManager/Shell/Android.bp @@ -105,6 +105,7 @@ android_library { static_libs: [ "protolog-lib", "WindowManager-Shell-proto", + "androidx.appcompat_appcompat", ], manifest: "AndroidManifest.xml", } \ No newline at end of file diff --git a/packages/SystemUI/res/drawable-hdpi/one_handed_tutorial.png b/libs/WindowManager/Shell/res/drawable-hdpi/one_handed_tutorial.png similarity index 100% rename from packages/SystemUI/res/drawable-hdpi/one_handed_tutorial.png rename to libs/WindowManager/Shell/res/drawable-hdpi/one_handed_tutorial.png diff --git a/packages/SystemUI/res/xml/one_handed_tutorial.xml b/libs/WindowManager/Shell/res/layout/one_handed_tutorial.xml similarity index 100% rename from packages/SystemUI/res/xml/one_handed_tutorial.xml rename to libs/WindowManager/Shell/res/layout/one_handed_tutorial.xml diff --git a/libs/WindowManager/Shell/res/values/config.xml b/libs/WindowManager/Shell/res/values/config.xml index 39efd0768eaa1..63b0f6ffbec39 100644 --- a/libs/WindowManager/Shell/res/values/config.xml +++ b/libs/WindowManager/Shell/res/values/config.xml @@ -29,4 +29,7 @@ 250 + + + true diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml index ce690281b491b..7fb641a4b06e3 100644 --- a/libs/WindowManager/Shell/res/values/dimen.xml +++ b/libs/WindowManager/Shell/res/values/dimen.xml @@ -62,4 +62,8 @@ 16dp 2dp + + + + 20dp diff --git a/libs/WindowManager/Shell/res/values/strings.xml b/libs/WindowManager/Shell/res/values/strings.xml index cad924771cd34..b6668fbe4872d 100644 --- a/libs/WindowManager/Shell/res/values/strings.xml +++ b/libs/WindowManager/Shell/res/values/strings.xml @@ -88,4 +88,9 @@ Top 30% Bottom full screen + + + Using one-handed mode + + To exit, swipe up from the bottom of the screen or tap anywhere above the app diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHanded.java similarity index 95% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHanded.java index b7c6262b07e0b..9c78fc5e57b86 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHanded.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHanded.java @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import androidx.annotation.NonNull; -import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; +import com.android.wm.shell.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; import java.io.PrintWriter; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationCallback.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationCallback.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationCallback.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationCallback.java index 264ace7493839..6749f7eec9683 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationCallback.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationCallback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.view.SurfaceControl; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationController.java similarity index 99% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationController.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationController.java index 9be1b5a35be67..963909621a1b2 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedAnimationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedAnimationController.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.animation.Animator; import android.animation.ValueAnimator; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedController.java similarity index 99% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedController.java index 90adf838440c9..c84b4781d19d5 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedController.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static android.os.UserHandle.USER_CURRENT; import static android.view.Display.DEFAULT_DISPLAY; @@ -35,9 +35,9 @@ import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.VisibleForTesting; -import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; import com.android.wm.shell.common.DisplayChangeController; import com.android.wm.shell.common.DisplayController; +import com.android.wm.shell.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; import java.io.PrintWriter; @@ -390,7 +390,7 @@ public class OneHandedController implements OneHanded { } } - @androidx.annotation.VisibleForTesting + @VisibleForTesting private void setEnabledGesturalOverlay(boolean enabled) { try { mOverlayManager.setEnabled(ONE_HANDED_MODE_GESTURAL_OVERLAY, enabled, USER_CURRENT); diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizer.java similarity index 98% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizer.java index ec40bad06b717..9954618134e83 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizer.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizer.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static android.view.Display.DEFAULT_DISPLAY; -import static com.android.systemui.onehanded.OneHandedAnimationController.TRANSITION_DIRECTION_EXIT; -import static com.android.systemui.onehanded.OneHandedAnimationController.TRANSITION_DIRECTION_TRIGGER; +import static com.android.wm.shell.onehanded.OneHandedAnimationController.TRANSITION_DIRECTION_EXIT; +import static com.android.wm.shell.onehanded.OneHandedAnimationController.TRANSITION_DIRECTION_TRIGGER; import android.content.Context; import android.graphics.Point; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedEvents.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedEvents.java similarity index 99% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedEvents.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedEvents.java index 327ed67d6fc8a..79ddd2b11e726 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedEvents.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedEvents.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.logging.UiEvent; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedGestureHandler.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedGestureHandler.java index 4a493ba800ba7..3b1e6cbe5ccde 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedGestureHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedGestureHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static android.view.Display.DEFAULT_DISPLAY; @@ -38,7 +38,7 @@ import android.window.WindowContainerTransaction; import androidx.annotation.VisibleForTesting; -import com.android.systemui.R; +import com.android.wm.shell.R; import com.android.wm.shell.common.DisplayChangeController; import com.android.wm.shell.common.DisplayController; @@ -210,7 +210,7 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, displaySize.y); mInputMonitor = InputManager.getInstance().monitorGestureInput( "onehanded-gesture-offset", DEFAULT_DISPLAY); - mInputEventReceiver = new SysUiInputEventReceiver( + mInputEventReceiver = new EventReceiver( mInputMonitor.getInputChannel(), Looper.getMainLooper()); } } @@ -227,8 +227,8 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback, mRotation = toRotation; } - private class SysUiInputEventReceiver extends InputEventReceiver { - SysUiInputEventReceiver(InputChannel channel, Looper looper) { + private class EventReceiver extends InputEventReceiver { + EventReceiver(InputChannel channel, Looper looper) { super(channel, looper); } diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSettingsUtil.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSettingsUtil.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSettingsUtil.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSettingsUtil.java index 0598f32c16d52..4d66f2961a293 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSettingsUtil.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSettingsUtil.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.annotation.IntDef; import android.content.ContentResolver; @@ -22,8 +22,6 @@ import android.database.ContentObserver; import android.net.Uri; import android.provider.Settings; -import com.android.systemui.dagger.SysUISingleton; - import java.io.PrintWriter; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -31,7 +29,6 @@ import java.lang.annotation.RetentionPolicy; /** * APIs for querying or updating one handed settings . */ -@SysUISingleton public final class OneHandedSettingsUtil { private static final String TAG = "OneHandedSettingsUtil"; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSurfaceTransactionHelper.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSurfaceTransactionHelper.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSurfaceTransactionHelper.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSurfaceTransactionHelper.java index bc4a9b49205c2..e7010db97d77c 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedSurfaceTransactionHelper.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedSurfaceTransactionHelper.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.content.Context; import android.content.res.Resources; import android.graphics.Rect; import android.view.SurfaceControl; -import com.android.systemui.R; +import com.android.wm.shell.R; /** * Abstracts the common operations on {@link SurfaceControl.Transaction} for OneHanded transition. diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedThread.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedThread.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedThread.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedThread.java index b7b814a31a1ec..24d33ede5d63c 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedThread.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedThread.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.os.Handler; import android.os.HandlerThread; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandler.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandler.java index 21329ea1b0e62..9c97cd7db71f4 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTimeoutHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandler.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; import android.os.Handler; import android.os.Looper; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTouchHandler.java similarity index 95% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTouchHandler.java index 3d28a426f4f8e..721382d52717e 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTouchHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTouchHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static android.view.Display.DEFAULT_DISPLAY; @@ -127,7 +127,7 @@ public class OneHandedTouchHandler implements OneHandedTransitionCallback { if (mIsEnabled) { mInputMonitor = InputManager.getInstance().monitorGestureInput( "onehanded-touch", DEFAULT_DISPLAY); - mInputEventReceiver = new SysUiInputEventReceiver( + mInputEventReceiver = new EventReceiver( mInputMonitor.getInputChannel(), Looper.getMainLooper()); } } @@ -150,8 +150,8 @@ public class OneHandedTouchHandler implements OneHandedTransitionCallback { pw.println(mLastUpdatedBounds); } - private class SysUiInputEventReceiver extends InputEventReceiver { - SysUiInputEventReceiver(InputChannel channel, Looper looper) { + private class EventReceiver extends InputEventReceiver { + EventReceiver(InputChannel channel, Looper looper) { super(channel, looper); } diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTransitionCallback.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTransitionCallback.java similarity index 96% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTransitionCallback.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTransitionCallback.java index 75eb0ebd5c84b..3af7c4b71d0ac 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTransitionCallback.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTransitionCallback.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.graphics.Rect; diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTutorialHandler.java similarity index 97% rename from packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java rename to libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTutorialHandler.java index beccf3dbc8deb..b15b5154c2a4c 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedTutorialHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/onehanded/OneHandedTutorialHandler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import android.content.ContentResolver; import android.content.Context; @@ -33,7 +33,7 @@ import android.widget.FrameLayout; import androidx.annotation.NonNull; -import com.android.systemui.R; +import com.android.wm.shell.R; import java.io.PrintWriter; @@ -79,7 +79,7 @@ public class OneHandedTutorialHandler implements OneHandedTransitionCallback { mTargetViewContainer.setClipChildren(false); mTutorialAreaHeight = Math.round(mDisplaySize.y * (SystemProperties.getInt(ONE_HANDED_MODE_OFFSET_PERCENTAGE, 50) / 100.0f)); - mTutorialView = LayoutInflater.from(context).inflate(R.xml.one_handed_tutorial, null); + mTutorialView = LayoutInflater.from(context).inflate(R.layout.one_handed_tutorial, null); mTargetViewContainer.addView(mTutorialView); mCanShowTutorial = (Settings.Secure.getInt(mContentResolver, Settings.Secure.ONE_HANDED_TUTORIAL_SHOW_COUNT, 0) >= MAX_TUTORIAL_SHOW_COUNT) diff --git a/libs/WindowManager/Shell/tests/unittest/Android.bp b/libs/WindowManager/Shell/tests/unittest/Android.bp index 692e2fa88fc3a..937b00b3a0fd9 100644 --- a/libs/WindowManager/Shell/tests/unittest/Android.bp +++ b/libs/WindowManager/Shell/tests/unittest/Android.bp @@ -25,6 +25,7 @@ android_test { "androidx.test.ext.junit", "mockito-target-extended-minus-junit4", "truth-prebuilt", + "testables", ], libs: [ "android.test.mock", diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedAnimationControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedAnimationControllerTest.java similarity index 98% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedAnimationControllerTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedAnimationControllerTest.java index 7fabf82581981..a8a3a9fd7da28 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedAnimationControllerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedAnimationControllerTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static org.junit.Assert.assertNotNull; diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedControllerTest.java similarity index 87% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedControllerTest.java index e42cf529373ec..1ce8b5445b377 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedControllerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedControllerTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static com.google.common.truth.Truth.assertThat; @@ -112,10 +112,21 @@ public class OneHandedControllerTest extends OneHandedTestCase { } @Test - public void testRegisterTransitionCallback() { - verify(mMockDisplayAreaOrganizer, atLeastOnce()).registerTransitionCallback(any()); + public void testRegisterTransitionCallbackAfterInit() { + verify(mMockDisplayAreaOrganizer).registerTransitionCallback(mMockTouchHandler); + verify(mMockDisplayAreaOrganizer).registerTransitionCallback(mMockGestureHandler); + verify(mMockDisplayAreaOrganizer).registerTransitionCallback(mMockTutorialHandler); } + @Test + public void testRegisterTransitionCallback() { + OneHandedTransitionCallback callback = new OneHandedTransitionCallback() {}; + mOneHandedController.registerTransitionCallback(callback); + + verify(mMockDisplayAreaOrganizer).registerTransitionCallback(callback); + } + + @Test public void testStopOneHanded_shouldRemoveTimer() { mOneHandedController.stopOneHanded(); @@ -139,7 +150,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { verify(mMockTouchHandler, atLeastOnce()).onOneHandedEnabled(enabled); } - @Ignore("b/161980408, fix it after migration finished") + @Ignore("b/167943723, refactor it and fix it") @Test public void tesSettingsObserver_updateTapAppToExit() { Settings.Secure.putInt(mContext.getContentResolver(), @@ -148,7 +159,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { verify(mOneHandedController).setTaskChangeToExit(true); } - @Ignore("b/161980408, fix it after migration finished") + @Ignore("b/167943723, refactor it and fix it") @Test public void tesSettingsObserver_updateEnabled() { Settings.Secure.putInt(mContext.getContentResolver(), @@ -157,7 +168,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { verify(mOneHandedController).setOneHandedEnabled(true); } - @Ignore("b/161980408, fix it after migration finished") + @Ignore("b/167943723, refactor it and fix it") @Test public void tesSettingsObserver_updateTimeout() { Settings.Secure.putInt(mContext.getContentResolver(), @@ -168,7 +179,7 @@ public class OneHandedControllerTest extends OneHandedTestCase { OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS); } - @Ignore("b/161980408, fix it after migration finished") + @Ignore("b/167943723, refactor it and fix it") @Test public void tesSettingsObserver_updateSwipeToNotification() { Settings.Secure.putInt(mContext.getContentResolver(), diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizerTest.java similarity index 99% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizerTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizerTest.java index a989cd1f9c404..5ff94b6308efb 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedDisplayAreaOrganizerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedDisplayAreaOrganizerTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static android.view.Display.DEFAULT_DISPLAY; import static android.window.DisplayAreaOrganizer.FEATURE_ONE_HANDED; diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedEventsTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedEventsTest.java similarity index 97% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedEventsTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedEventsTest.java index 36c1174fcdce7..492c34e10ed54 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedEventsTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedEventsTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static org.junit.Assert.assertEquals; @@ -22,7 +22,6 @@ import androidx.test.filters.SmallTest; import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.testing.UiEventLoggerFake; -import com.android.systemui.SysuiTestCase; import org.junit.Before; import org.junit.Test; @@ -34,7 +33,7 @@ import java.util.Collection; @RunWith(Parameterized.class) @SmallTest -public class OneHandedEventsTest extends SysuiTestCase { +public class OneHandedEventsTest extends OneHandedTestCase { private UiEventLoggerFake mUiEventLogger; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedGestureHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedGestureHandlerTest.java new file mode 100644 index 0000000000000..fb417c8ca5e8b --- /dev/null +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedGestureHandlerTest.java @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.onehanded; + +import static com.google.common.truth.Truth.assertThat; + +import static org.mockito.ArgumentMatchers.any; + +import android.testing.AndroidTestingRunner; +import android.testing.TestableLooper; + +import androidx.test.filters.SmallTest; + +import com.android.wm.shell.common.DisplayController; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +@SmallTest +@RunWith(AndroidTestingRunner.class) +@TestableLooper.RunWithLooper +public class OneHandedGestureHandlerTest extends OneHandedTestCase { + OneHandedTutorialHandler mTutorialHandler; + OneHandedGestureHandler mGestureHandler; + @Mock + DisplayController mMockDisplayController; + @Before + public void setUp() throws Exception { + MockitoAnnotations.initMocks(this); + mTutorialHandler = new OneHandedTutorialHandler(mContext); + mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController); + } + + @Test + public void testSetGestureEventListener() { + OneHandedGestureHandler.OneHandedGestureEventCallback callback = + new OneHandedGestureHandler.OneHandedGestureEventCallback() { + @Override + public void onStart() {} + + @Override + public void onStop() {} + }; + + mGestureHandler.setGestureEventListener(callback); + assertThat(mGestureHandler.mGestureEventCallback).isEqualTo(callback); + } + + @Ignore("b/167943723, refactor it and fix it") + @Test + public void testReceiveNewConfig_whenThreeButtonModeEnabled() { + mGestureHandler.onOneHandedEnabled(true); + mGestureHandler.onThreeButtonModeEnabled(true); + + assertThat(mGestureHandler.mInputMonitor).isNotNull(); + assertThat(mGestureHandler.mInputEventReceiver).isNotNull(); + } + + @Test + public void testOneHandedDisabled_shouldDisposeInputChannel() { + mGestureHandler.onOneHandedEnabled(false); + + assertThat(mGestureHandler.mInputMonitor).isNull(); + assertThat(mGestureHandler.mInputEventReceiver).isNull(); + } + + @Test + public void testChangeNavBarToNon3Button_shouldDisposeInputChannel() { + mGestureHandler.onOneHandedEnabled(true); + mGestureHandler.onThreeButtonModeEnabled(false); + + assertThat(mGestureHandler.mInputMonitor).isNull(); + assertThat(mGestureHandler.mInputEventReceiver).isNull(); + } +} diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedSettingsUtilTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedSettingsUtilTest.java similarity index 84% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedSettingsUtilTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedSettingsUtilTest.java index 990eb634e46fe..7c11138a47aaf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedSettingsUtilTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedSettingsUtilTest.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS; import static com.google.common.truth.Truth.assertThat; @@ -59,24 +59,24 @@ public class OneHandedSettingsUtilTest extends OneHandedTestCase { @Test public void testRegisterSecureKeyObserver() { final Uri result = OneHandedSettingsUtil.registerSettingsKeyObserver( - Settings.Secure.ONE_HANDED_MODE_ENABLED, mContentResolver, mContentObserver); + Settings.Secure.TAPS_APP_TO_EXIT, mContentResolver, mContentObserver); assertThat(result).isNotNull(); OneHandedSettingsUtil.registerSettingsKeyObserver( - Settings.Secure.ONE_HANDED_MODE_ENABLED, mContentResolver, mContentObserver); + Settings.Secure.TAPS_APP_TO_EXIT, mContentResolver, mContentObserver); } @Test public void testUnregisterSecureKeyObserver() { OneHandedSettingsUtil.registerSettingsKeyObserver( - Settings.Secure.ONE_HANDED_MODE_ENABLED, mContentResolver, mContentObserver); + Settings.Secure.TAPS_APP_TO_EXIT, mContentResolver, mContentObserver); OneHandedSettingsUtil.unregisterSettingsKeyObserver(mContentResolver, mContentObserver); assertThat(mOnChanged).isFalse(); Settings.Secure.putInt(mContext.getContentResolver(), - Settings.Secure.ONE_HANDED_MODE_ENABLED, 0); + Settings.Secure.TAPS_APP_TO_EXIT, 0); assertThat(mOnChanged).isFalse(); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTestCase.java similarity index 73% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTestCase.java index f111c48964581..c7ae2a09ad67f 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTestCase.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTestCase.java @@ -14,17 +14,21 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; -import static com.android.systemui.onehanded.OneHandedController.SUPPORT_ONE_HANDED_MODE; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; +import static android.view.Display.DEFAULT_DISPLAY; + +import static com.android.wm.shell.onehanded.OneHandedController.SUPPORT_ONE_HANDED_MODE; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; import static org.junit.Assume.assumeTrue; +import android.content.Context; +import android.hardware.display.DisplayManager; import android.os.SystemProperties; import android.provider.Settings; -import com.android.systemui.SysuiTestCase; +import androidx.test.platform.app.InstrumentationRegistry; import org.junit.After; import org.junit.Before; @@ -32,14 +36,26 @@ import org.junit.Before; /** * Base class that does One Handed specific setup. */ -public abstract class OneHandedTestCase extends SysuiTestCase { +public abstract class OneHandedTestCase { static boolean sOrigEnabled; static boolean sOrigTapsAppToExitEnabled; static int sOrigTimeout; static boolean sOrigSwipeToNotification; + protected Context mContext; + @Before public void setupSettings() { + final Context testContext = + InstrumentationRegistry.getInstrumentation().getTargetContext(); + final DisplayManager dm = testContext.getSystemService(DisplayManager.class); + mContext = testContext.createDisplayContext(dm.getDisplay(DEFAULT_DISPLAY)); + + InstrumentationRegistry + .getInstrumentation() + .getUiAutomation() + .adoptShellPermissionIdentity(); + sOrigEnabled = OneHandedSettingsUtil.getSettingsOneHandedModeEnabled( getContext().getContentResolver()); sOrigTimeout = OneHandedSettingsUtil.getSettingsOneHandedModeTimeout( @@ -74,6 +90,15 @@ public abstract class OneHandedTestCase extends SysuiTestCase { Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED, sOrigSwipeToNotification ? 1 : 0); + + InstrumentationRegistry + .getInstrumentation() + .getUiAutomation() + .dropShellPermissionIdentity(); + } + + protected Context getContext() { + return mContext; } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTimeoutHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandlerTest.java similarity index 90% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTimeoutHandlerTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandlerTest.java index 7d631319ec5e8..e2b70c3bcc70d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTimeoutHandlerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTimeoutHandlerTest.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER; -import static com.android.systemui.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS; -import static com.android.systemui.onehanded.OneHandedTimeoutHandler.ONE_HANDED_TIMEOUT_STOP_MSG; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_LONG_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_MEDIUM_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_NEVER; +import static com.android.wm.shell.onehanded.OneHandedSettingsUtil.ONE_HANDED_TIMEOUT_SHORT_IN_SECONDS; +import static com.android.wm.shell.onehanded.OneHandedTimeoutHandler.ONE_HANDED_TIMEOUT_STOP_MSG; import static com.google.common.truth.Truth.assertThat; diff --git a/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTouchHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTouchHandlerTest.java new file mode 100644 index 0000000000000..c69e385b2602c --- /dev/null +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTouchHandlerTest.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.wm.shell.onehanded; + +import static com.google.common.truth.Truth.assertThat; + +import android.testing.AndroidTestingRunner; +import android.testing.TestableLooper; + +import androidx.test.filters.SmallTest; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockitoAnnotations; + +@SmallTest +@RunWith(AndroidTestingRunner.class) +@TestableLooper.RunWithLooper +public class OneHandedTouchHandlerTest extends OneHandedTestCase { + OneHandedTouchHandler mTouchHandler; + + @Before + public void setUp() { + MockitoAnnotations.initMocks(this); + mTouchHandler = new OneHandedTouchHandler(); + } + + @Test + public void testRegisterTouchEventListener() { + OneHandedTouchHandler.OneHandedTouchEventCallback callback = () -> { + }; + mTouchHandler.registerTouchEventListener(callback); + + assertThat(mTouchHandler.mTouchEventCallback).isEqualTo(callback); + } + + @Test + public void testOneHandedDisabled_shouldDisposeInputChannel() { + mTouchHandler.onOneHandedEnabled(false); + + assertThat(mTouchHandler.mInputMonitor).isNull(); + assertThat(mTouchHandler.mInputEventReceiver).isNull(); + } + + @Ignore("b/167943723, refactor it and fix it") + @Test + public void testOneHandedEnabled_monitorInputChannel() { + mTouchHandler.onOneHandedEnabled(true); + + assertThat(mTouchHandler.mInputMonitor).isNotNull(); + assertThat(mTouchHandler.mInputEventReceiver).isNotNull(); + } +} \ No newline at end of file diff --git a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTutorialHandlerTest.java similarity index 91% rename from packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java rename to libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTutorialHandlerTest.java index 8ea5524eb7e62..4a133d39291a7 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/onehanded/OneHandedTutorialHandlerTest.java +++ b/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/OneHandedTutorialHandlerTest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.android.systemui.onehanded; +package com.android.wm.shell.onehanded; import static org.mockito.Mockito.verify; @@ -29,13 +29,13 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @SmallTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper public class OneHandedTutorialHandlerTest extends OneHandedTestCase { + @Mock OneHandedTouchHandler mTouchHandler; OneHandedTutorialHandler mTutorialHandler; OneHandedGestureHandler mGestureHandler; @@ -48,8 +48,7 @@ public class OneHandedTutorialHandlerTest extends OneHandedTestCase { @Before public void setUp() { MockitoAnnotations.initMocks(this); - mTouchHandler = new OneHandedTouchHandler(); - mTutorialHandler = Mockito.spy(new OneHandedTutorialHandler(mContext)); + mTutorialHandler = new OneHandedTutorialHandler(mContext); mGestureHandler = new OneHandedGestureHandler(mContext, mMockDisplayController); mOneHandedController = new OneHandedController( getContext(), diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 1c3fba2abacda..ab09a967bc266 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -560,9 +560,6 @@ 1.25 - - true - false diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 76c61fb6e1e58..875fe1471b1c6 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1366,8 +1366,4 @@ @*android:dimen/rounded_corner_radius @*android:dimen/rounded_corner_radius_top @*android:dimen/rounded_corner_radius_bottom - - - - 20dp diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index e58bf3bad795c..cca70f9aa5187 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2799,9 +2799,4 @@ - - - Using one-handed mode - - To exit, swipe up from the bottom of the screen or tap anywhere above the app diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index cba938f5e1a6c..2a976f546ba42 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -75,8 +75,6 @@ import com.android.systemui.navigationbar.NavigationBar; import com.android.systemui.navigationbar.NavigationBarController; import com.android.systemui.navigationbar.NavigationBarView; import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.onehanded.OneHanded; -import com.android.systemui.onehanded.OneHandedEvents; import com.android.systemui.pip.Pip; import com.android.systemui.pip.PipAnimationController; import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener; @@ -93,6 +91,8 @@ import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowCallback; import com.android.systemui.statusbar.policy.CallbackController; +import com.android.wm.shell.onehanded.OneHanded; +import com.android.wm.shell.onehanded.OneHandedEvents; import com.android.wm.shell.splitscreen.SplitScreen; import java.io.FileDescriptor; diff --git a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java index c7a9af3642e55..98c0b1e99fc49 100644 --- a/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java +++ b/packages/SystemUI/src/com/android/systemui/wmshell/WMShell.java @@ -38,10 +38,6 @@ import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.keyguard.ScreenLifecycle; import com.android.systemui.model.SysUiState; import com.android.systemui.navigationbar.NavigationModeController; -import com.android.systemui.onehanded.OneHanded; -import com.android.systemui.onehanded.OneHandedEvents; -import com.android.systemui.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; -import com.android.systemui.onehanded.OneHandedTransitionCallback; import com.android.systemui.pip.Pip; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.shared.system.TaskStackChangeListener; @@ -51,6 +47,10 @@ import com.android.systemui.tracing.ProtoTracer; import com.android.systemui.tracing.nano.SystemUiTraceProto; import com.android.wm.shell.common.DisplayImeController; import com.android.wm.shell.nano.WmShellTraceProto; +import com.android.wm.shell.onehanded.OneHanded; +import com.android.wm.shell.onehanded.OneHandedEvents; +import com.android.wm.shell.onehanded.OneHandedGestureHandler.OneHandedGestureEventCallback; +import com.android.wm.shell.onehanded.OneHandedTransitionCallback; import com.android.wm.shell.protolog.ShellProtoLogImpl; import com.android.wm.shell.splitscreen.SplitScreen; @@ -248,10 +248,9 @@ public final class WMShell extends SystemUI implements ProtoTraceable