Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +0 −81 Original line number Diff line number Diff line Loading @@ -19,12 +19,9 @@ import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Rect; import android.os.Bundle; import android.view.Gravity; import android.view.View; import androidx.annotation.Nullable; Loading @@ -38,7 +35,6 @@ import com.android.launcher3.WorkspaceItemInfo; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.folder.Folder; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.hybridhotseat.HotseatPredictionController; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController; Loading Loading @@ -71,77 +67,6 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { */ public static final AsyncCommand SET_SHELF_HEIGHT = (context, arg1, arg2) -> SystemUiProxy.INSTANCE.get(context).setShelfHeight(arg1 != 0, arg2); public static final RotationMode ROTATION_LANDSCAPE = new RotationMode(-90) { @Override public void mapRect(int left, int top, int right, int bottom, Rect out) { out.left = top; out.top = right; out.right = bottom; out.bottom = left; } @Override public void mapInsets(Context context, Rect insets, Rect out) { // If there is a display cutout, the top insets in portrait would also include the // cutout, which we will get as the left inset in landscape. Using the max of left and // top allows us to cover both cases (with or without cutout). if (SysUINavigationMode.getMode(context) == NO_BUTTON) { out.top = Math.max(insets.top, insets.left); out.bottom = Math.max(insets.right, insets.bottom); out.left = out.right = 0; } else { out.top = Math.max(insets.top, insets.left); out.bottom = insets.right; out.left = insets.bottom; out.right = 0; } } }; public static final RotationMode ROTATION_SEASCAPE = new RotationMode(90) { @Override public void mapRect(int left, int top, int right, int bottom, Rect out) { out.left = bottom; out.top = left; out.right = top; out.bottom = right; } @Override public void mapInsets(Context context, Rect insets, Rect out) { if (SysUINavigationMode.getMode(context) == NO_BUTTON) { out.top = Math.max(insets.top, insets.right); out.bottom = Math.max(insets.left, insets.bottom); out.left = out.right = 0; } else { out.top = Math.max(insets.top, insets.right); out.bottom = insets.left; out.right = insets.bottom; out.left = 0; } } @Override public int toNaturalGravity(int absoluteGravity) { int horizontalGravity = absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK; int verticalGravity = absoluteGravity & Gravity.VERTICAL_GRAVITY_MASK; if (horizontalGravity == Gravity.RIGHT) { horizontalGravity = Gravity.LEFT; } else if (horizontalGravity == Gravity.LEFT) { horizontalGravity = Gravity.RIGHT; } if (verticalGravity == Gravity.TOP) { verticalGravity = Gravity.BOTTOM; } else if (verticalGravity == Gravity.BOTTOM) { verticalGravity = Gravity.TOP; } return ((absoluteGravity & ~Gravity.HORIZONTAL_GRAVITY_MASK) & ~Gravity.VERTICAL_GRAVITY_MASK) | horizontalGravity | verticalGravity; } }; private HotseatPredictionController mHotseatPredictionController; @Override Loading @@ -152,12 +77,6 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { } } @Override protected RotationMode getFakeRotationMode(DeviceProfile dp) { return !dp.isVerticalBarLayout() ? RotationMode.NORMAL : (dp.isSeascape() ? ROTATION_SEASCAPE : ROTATION_LANDSCAPE); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +2 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; Loading Loading @@ -149,8 +148,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten VibratorWrapper.INSTANCE.get(mContext).vibrate(OVERVIEW_HAPTIC); } public Consumer<MotionEvent> getRecentsViewDispatcher(RotationMode navBarRotationMode) { return mRecentsView != null ? mRecentsView.getEventDispatcher(navBarRotationMode) : null; public Consumer<MotionEvent> getRecentsViewDispatcher(float navbarRotation) { return mRecentsView != null ? mRecentsView.getEventDispatcher(navbarRotation) : null; } @UiThread Loading quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +1 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC if (mPassedWindowMoveSlop && mInteractionHandler != null && !mRecentsViewDispatcher.hasConsumer()) { mRecentsViewDispatcher.setConsumer(mInteractionHandler .getRecentsViewDispatcher(mNavBarPosition.getRotationMode())); .getRecentsViewDispatcher(mNavBarPosition.getRotation())); } int edgeFlags = ev.getEdgeFlags(); ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −5 Original line number Diff line number Diff line Loading @@ -99,7 +99,6 @@ import com.android.launcher3.anim.PropertyListBuilder; import com.android.launcher3.anim.SpringProperty; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; Loading Loading @@ -1984,13 +1983,13 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return offsetX; } public Consumer<MotionEvent> getEventDispatcher(RotationMode navBarRotationMode) { public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) { float degreesRotated; if (navBarRotationMode == RotationMode.NORMAL) { if (navbarRotation == 0) { degreesRotated = mOrientationState.areMultipleLayoutOrientationsDisabled() ? 0 : RotationHelper.getDegreesFromRotation(mLayoutRotation); } else { degreesRotated = -navBarRotationMode.surfaceRotation; degreesRotated = -navbarRotation; } if (degreesRotated == 0) { return super::onTouchEvent; Loading @@ -2000,7 +1999,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl // undo that transformation since PagedView also accommodates for the transformation via // PagedOrientationHandler return e -> { if (navBarRotationMode != RotationMode.NORMAL if (navbarRotation != 0 && !mOrientationState.areMultipleLayoutOrientationsDisabled()) { RotationHelper.transformEventForNavBar(e, true); super.onTouchEvent(e); Loading quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +1 −4 Original line number Diff line number Diff line Loading @@ -88,9 +88,7 @@ public abstract class BaseQuickstepLauncher extends Launcher super.onCreate(savedInstanceState); mSystemActions = new SystemActions(this); SysUINavigationMode.Mode mode = SysUINavigationMode.INSTANCE.get(this) .addModeChangeListener(this); getRotationHelper().setRotationHadDifferentUI(mode != Mode.NO_BUTTON); SysUINavigationMode.INSTANCE.get(this).addModeChangeListener(this); if (!getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, false)) { getStateManager().addStateListener(new LauncherStateManager.StateListener() { Loading Loading @@ -141,7 +139,6 @@ public abstract class BaseQuickstepLauncher extends Launcher @Override public void onNavigationModeChanged(Mode newMode) { getDragLayer().recreateControllers(); getRotationHelper().setRotationHadDifferentUI(newMode != Mode.NO_BUTTON); } @Override Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +0 −81 Original line number Diff line number Diff line Loading @@ -19,12 +19,9 @@ import static com.android.launcher3.LauncherState.NORMAL; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Rect; import android.os.Bundle; import android.view.Gravity; import android.view.View; import androidx.annotation.Nullable; Loading @@ -38,7 +35,6 @@ import com.android.launcher3.WorkspaceItemInfo; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.folder.Folder; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.hybridhotseat.HotseatPredictionController; import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.uioverrides.touchcontrollers.FlingAndHoldTouchController; Loading Loading @@ -71,77 +67,6 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { */ public static final AsyncCommand SET_SHELF_HEIGHT = (context, arg1, arg2) -> SystemUiProxy.INSTANCE.get(context).setShelfHeight(arg1 != 0, arg2); public static final RotationMode ROTATION_LANDSCAPE = new RotationMode(-90) { @Override public void mapRect(int left, int top, int right, int bottom, Rect out) { out.left = top; out.top = right; out.right = bottom; out.bottom = left; } @Override public void mapInsets(Context context, Rect insets, Rect out) { // If there is a display cutout, the top insets in portrait would also include the // cutout, which we will get as the left inset in landscape. Using the max of left and // top allows us to cover both cases (with or without cutout). if (SysUINavigationMode.getMode(context) == NO_BUTTON) { out.top = Math.max(insets.top, insets.left); out.bottom = Math.max(insets.right, insets.bottom); out.left = out.right = 0; } else { out.top = Math.max(insets.top, insets.left); out.bottom = insets.right; out.left = insets.bottom; out.right = 0; } } }; public static final RotationMode ROTATION_SEASCAPE = new RotationMode(90) { @Override public void mapRect(int left, int top, int right, int bottom, Rect out) { out.left = bottom; out.top = left; out.right = top; out.bottom = right; } @Override public void mapInsets(Context context, Rect insets, Rect out) { if (SysUINavigationMode.getMode(context) == NO_BUTTON) { out.top = Math.max(insets.top, insets.right); out.bottom = Math.max(insets.left, insets.bottom); out.left = out.right = 0; } else { out.top = Math.max(insets.top, insets.right); out.bottom = insets.left; out.right = insets.bottom; out.left = 0; } } @Override public int toNaturalGravity(int absoluteGravity) { int horizontalGravity = absoluteGravity & Gravity.HORIZONTAL_GRAVITY_MASK; int verticalGravity = absoluteGravity & Gravity.VERTICAL_GRAVITY_MASK; if (horizontalGravity == Gravity.RIGHT) { horizontalGravity = Gravity.LEFT; } else if (horizontalGravity == Gravity.LEFT) { horizontalGravity = Gravity.RIGHT; } if (verticalGravity == Gravity.TOP) { verticalGravity = Gravity.BOTTOM; } else if (verticalGravity == Gravity.BOTTOM) { verticalGravity = Gravity.TOP; } return ((absoluteGravity & ~Gravity.HORIZONTAL_GRAVITY_MASK) & ~Gravity.VERTICAL_GRAVITY_MASK) | horizontalGravity | verticalGravity; } }; private HotseatPredictionController mHotseatPredictionController; @Override Loading @@ -152,12 +77,6 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { } } @Override protected RotationMode getFakeRotationMode(DeviceProfile dp) { return !dp.isVerticalBarLayout() ? RotationMode.NORMAL : (dp.isSeascape() ? ROTATION_SEASCAPE : ROTATION_LANDSCAPE); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/BaseSwipeUpHandler.java +2 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,6 @@ import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.model.PagedViewOrientedState; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; Loading Loading @@ -149,8 +148,8 @@ public abstract class BaseSwipeUpHandler<T extends BaseDraggingActivity, Q exten VibratorWrapper.INSTANCE.get(mContext).vibrate(OVERVIEW_HAPTIC); } public Consumer<MotionEvent> getRecentsViewDispatcher(RotationMode navBarRotationMode) { return mRecentsView != null ? mRecentsView.getEventDispatcher(navBarRotationMode) : null; public Consumer<MotionEvent> getRecentsViewDispatcher(float navbarRotation) { return mRecentsView != null ? mRecentsView.getEventDispatcher(navbarRotation) : null; } @UiThread Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +1 −1 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC if (mPassedWindowMoveSlop && mInteractionHandler != null && !mRecentsViewDispatcher.hasConsumer()) { mRecentsViewDispatcher.setConsumer(mInteractionHandler .getRecentsViewDispatcher(mNavBarPosition.getRotationMode())); .getRecentsViewDispatcher(mNavBarPosition.getRotation())); } int edgeFlags = ev.getEdgeFlags(); ev.setEdgeFlags(edgeFlags | EDGE_NAV_BAR); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +4 −5 Original line number Diff line number Diff line Loading @@ -99,7 +99,6 @@ import com.android.launcher3.anim.PropertyListBuilder; import com.android.launcher3.anim.SpringProperty; import com.android.launcher3.compat.AccessibilityManagerCompat; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.statehandlers.DepthController; import com.android.launcher3.states.RotationHelper; import com.android.launcher3.testing.TestProtocol; Loading Loading @@ -1984,13 +1983,13 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl return offsetX; } public Consumer<MotionEvent> getEventDispatcher(RotationMode navBarRotationMode) { public Consumer<MotionEvent> getEventDispatcher(float navbarRotation) { float degreesRotated; if (navBarRotationMode == RotationMode.NORMAL) { if (navbarRotation == 0) { degreesRotated = mOrientationState.areMultipleLayoutOrientationsDisabled() ? 0 : RotationHelper.getDegreesFromRotation(mLayoutRotation); } else { degreesRotated = -navBarRotationMode.surfaceRotation; degreesRotated = -navbarRotation; } if (degreesRotated == 0) { return super::onTouchEvent; Loading @@ -2000,7 +1999,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl // undo that transformation since PagedView also accommodates for the transformation via // PagedOrientationHandler return e -> { if (navBarRotationMode != RotationMode.NORMAL if (navbarRotation != 0 && !mOrientationState.areMultipleLayoutOrientationsDisabled()) { RotationHelper.transformEventForNavBar(e, true); super.onTouchEvent(e); Loading
quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java +1 −4 Original line number Diff line number Diff line Loading @@ -88,9 +88,7 @@ public abstract class BaseQuickstepLauncher extends Launcher super.onCreate(savedInstanceState); mSystemActions = new SystemActions(this); SysUINavigationMode.Mode mode = SysUINavigationMode.INSTANCE.get(this) .addModeChangeListener(this); getRotationHelper().setRotationHadDifferentUI(mode != Mode.NO_BUTTON); SysUINavigationMode.INSTANCE.get(this).addModeChangeListener(this); if (!getSharedPrefs().getBoolean(HOME_BOUNCE_SEEN, false)) { getStateManager().addStateListener(new LauncherStateManager.StateListener() { Loading Loading @@ -141,7 +139,6 @@ public abstract class BaseQuickstepLauncher extends Launcher @Override public void onNavigationModeChanged(Mode newMode) { getDragLayer().recreateControllers(); getRotationHelper().setRotationHadDifferentUI(newMode != Mode.NO_BUTTON); } @Override Loading