Loading quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java +1 −2 Original line number Diff line number Diff line Loading @@ -165,8 +165,7 @@ public abstract class RecentsUiFactory { } if (FeatureFlags.PULL_DOWN_STATUS_BAR && !launcher.getDeviceProfile().isMultiWindowMode && !launcher.getDeviceProfile().isVerticalBarLayout()) { && !launcher.getDeviceProfile().isMultiWindowMode) { list.add(new StatusBarTouchController(launcher)); } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +1 −1 Original line number Diff line number Diff line Loading @@ -723,7 +723,7 @@ public class TouchInteractionService extends Service implements return new OverviewInputConsumer(activity, mInputMonitorCompat, false /* startingInActivityBounds */); } else { return new OverviewWithoutFocusInputConsumer(this, mInputMonitorCompat, return new OverviewWithoutFocusInputConsumer(activity, mInputMonitorCompat, disableHorizontalSwipe(event)); } } Loading quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java +15 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,13 @@ import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.ViewConfiguration; import com.android.launcher3.BaseActivity; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.Utilities; import com.android.launcher3.logging.StatsLogUtils; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading Loading @@ -131,12 +137,14 @@ public class OverviewWithoutFocusInputConsumer implements InputConsumer { ? -velocityX : (mNavBarPosition.isLeftEdge() ? velocityX : -velocityY); final boolean triggerQuickstep; int touch = Touch.FLING; if (Math.abs(velocity) >= ViewConfiguration.get(mContext).getScaledMinimumFlingVelocity()) { triggerQuickstep = velocity > 0; } else { float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); float displacementY = ev.getY() - mDownPos.y; triggerQuickstep = squaredHypot(displacementX, displacementY) >= mSquaredTouchSlop; touch = Touch.SWIPE; } if (triggerQuickstep) { Loading @@ -144,6 +152,13 @@ public class OverviewWithoutFocusInputConsumer implements InputConsumer { ActivityManagerWrapper.getInstance() .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS); TOUCH_INTERACTION_LOG.addLog("startQuickstep"); BaseActivity activity = BaseDraggingActivity.fromContext(mContext); int pageIndex = -1; // This number doesn't reflect workspace page index. // It only indicates that launcher client screen was shown. int containerType = StatsLogUtils.getContainerTypeFromState(activity.getCurrentState()); activity.getUserEventDispatcher().logActionOnContainer( touch, Direction.UP, containerType, pageIndex); activity.getUserEventDispatcher().setPreviousHomeGesture(true); } else { // ignore } Loading quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java +8 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.util.TouchController; import com.android.quickstep.RecentsModel; import com.android.systemui.shared.recents.ISystemUiProxy; Loading Loading @@ -132,8 +135,12 @@ public class StatusBarTouchController implements TouchController { @Override public final boolean onControllerTouchEvent(MotionEvent ev) { if (ev.getAction() == ACTION_UP || ev.getAction() == ACTION_CANCEL) { int action = ev.getAction(); if (action == ACTION_UP || action == ACTION_CANCEL) { dispatchTouchEvent(ev); mLauncher.getUserEventDispatcher().logActionOnContainer(action == ACTION_UP ? Touch.FLING : Touch.SWIPE, Direction.DOWN, ContainerType.WORKSPACE, mLauncher.getWorkspace().getCurrentPage()); setWindowSlippery(false); return true; } Loading src/com/android/launcher3/Workspace.java +5 −2 Original line number Diff line number Diff line Loading @@ -81,10 +81,10 @@ import com.android.launcher3.folder.PreviewBackground; import com.android.launcher3.graphics.DragPreviewProvider; import com.android.launcher3.graphics.PreloadIconDrawable; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.pageindicators.WorkspacePageIndicator; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.shortcuts.ShortcutDragPreviewProvider; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.WorkspaceTouchListener; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; Loading Loading @@ -1053,8 +1053,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator> // Not announcing the overlay page for accessibility since it announces itself. } else if (Float.compare(scroll, 0f) == 0) { if (mOverlayShown) { UserEventDispatcher ued = mLauncher.getUserEventDispatcher(); if (!ued.isPreviousHomeGesture()) { mLauncher.getUserEventDispatcher().logActionOnContainer(Action.Touch.SWIPE, Action.Direction.RIGHT, ContainerType.WORKSPACE, -1); } } else if (Float.compare(mOverlayTranslation, 0f) != 0) { // When arriving to 0 overscroll from non-zero overscroll, announce page for // accessibility since default announcements were disabled while in overscroll Loading Loading
quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/RecentsUiFactory.java +1 −2 Original line number Diff line number Diff line Loading @@ -165,8 +165,7 @@ public abstract class RecentsUiFactory { } if (FeatureFlags.PULL_DOWN_STATUS_BAR && !launcher.getDeviceProfile().isMultiWindowMode && !launcher.getDeviceProfile().isVerticalBarLayout()) { && !launcher.getDeviceProfile().isMultiWindowMode) { list.add(new StatusBarTouchController(launcher)); } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +1 −1 Original line number Diff line number Diff line Loading @@ -723,7 +723,7 @@ public class TouchInteractionService extends Service implements return new OverviewInputConsumer(activity, mInputMonitorCompat, false /* startingInActivityBounds */); } else { return new OverviewWithoutFocusInputConsumer(this, mInputMonitorCompat, return new OverviewWithoutFocusInputConsumer(activity, mInputMonitorCompat, disableHorizontalSwipe(event)); } } Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewWithoutFocusInputConsumer.java +15 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,13 @@ import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.ViewConfiguration; import com.android.launcher3.BaseActivity; import com.android.launcher3.BaseDraggingActivity; import com.android.launcher3.Utilities; import com.android.launcher3.logging.StatsLogUtils; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.util.NavBarPosition; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading Loading @@ -131,12 +137,14 @@ public class OverviewWithoutFocusInputConsumer implements InputConsumer { ? -velocityX : (mNavBarPosition.isLeftEdge() ? velocityX : -velocityY); final boolean triggerQuickstep; int touch = Touch.FLING; if (Math.abs(velocity) >= ViewConfiguration.get(mContext).getScaledMinimumFlingVelocity()) { triggerQuickstep = velocity > 0; } else { float displacementX = mDisableHorizontalSwipe ? 0 : (ev.getX() - mDownPos.x); float displacementY = ev.getY() - mDownPos.y; triggerQuickstep = squaredHypot(displacementX, displacementY) >= mSquaredTouchSlop; touch = Touch.SWIPE; } if (triggerQuickstep) { Loading @@ -144,6 +152,13 @@ public class OverviewWithoutFocusInputConsumer implements InputConsumer { ActivityManagerWrapper.getInstance() .closeSystemWindows(CLOSE_SYSTEM_WINDOWS_REASON_RECENTS); TOUCH_INTERACTION_LOG.addLog("startQuickstep"); BaseActivity activity = BaseDraggingActivity.fromContext(mContext); int pageIndex = -1; // This number doesn't reflect workspace page index. // It only indicates that launcher client screen was shown. int containerType = StatsLogUtils.getContainerTypeFromState(activity.getCurrentState()); activity.getUserEventDispatcher().logActionOnContainer( touch, Direction.UP, containerType, pageIndex); activity.getUserEventDispatcher().setPreviousHomeGesture(true); } else { // ignore } Loading
quickstep/src/com/android/launcher3/uioverrides/touchcontrollers/StatusBarTouchController.java +8 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; import com.android.launcher3.util.TouchController; import com.android.quickstep.RecentsModel; import com.android.systemui.shared.recents.ISystemUiProxy; Loading Loading @@ -132,8 +135,12 @@ public class StatusBarTouchController implements TouchController { @Override public final boolean onControllerTouchEvent(MotionEvent ev) { if (ev.getAction() == ACTION_UP || ev.getAction() == ACTION_CANCEL) { int action = ev.getAction(); if (action == ACTION_UP || action == ACTION_CANCEL) { dispatchTouchEvent(ev); mLauncher.getUserEventDispatcher().logActionOnContainer(action == ACTION_UP ? Touch.FLING : Touch.SWIPE, Direction.DOWN, ContainerType.WORKSPACE, mLauncher.getWorkspace().getCurrentPage()); setWindowSlippery(false); return true; } Loading
src/com/android/launcher3/Workspace.java +5 −2 Original line number Diff line number Diff line Loading @@ -81,10 +81,10 @@ import com.android.launcher3.folder.PreviewBackground; import com.android.launcher3.graphics.DragPreviewProvider; import com.android.launcher3.graphics.PreloadIconDrawable; import com.android.launcher3.graphics.RotationMode; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.pageindicators.WorkspacePageIndicator; import com.android.launcher3.popup.PopupContainerWithArrow; import com.android.launcher3.shortcuts.ShortcutDragPreviewProvider; import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.touch.WorkspaceTouchListener; import com.android.launcher3.userevent.nano.LauncherLogProto.Action; import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType; Loading Loading @@ -1053,8 +1053,11 @@ public class Workspace extends PagedView<WorkspacePageIndicator> // Not announcing the overlay page for accessibility since it announces itself. } else if (Float.compare(scroll, 0f) == 0) { if (mOverlayShown) { UserEventDispatcher ued = mLauncher.getUserEventDispatcher(); if (!ued.isPreviousHomeGesture()) { mLauncher.getUserEventDispatcher().logActionOnContainer(Action.Touch.SWIPE, Action.Direction.RIGHT, ContainerType.WORKSPACE, -1); } } else if (Float.compare(mOverlayTranslation, 0f) != 0) { // When arriving to 0 overscroll from non-zero overscroll, announce page for // accessibility since default announcements were disabled while in overscroll Loading