Loading go/quickstep/src/com/android/quickstep/TouchInteractionService.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ public class TouchInteractionService extends Service { // TODO handle assistant } public void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) { } /** Deprecated methods **/ public void onQuickStep(MotionEvent motionEvent) { } Loading protos/launcher_log.proto +2 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ enum ControlType { RESIZE_HANDLE = 8; VERTICAL_SCROLL = 9; HOME_INTENT = 10; // Deprecated, use enum Command instead BACK_BUTTON = 11; // Deprecated, use enum Command instead BACK_BUTTON = 11; QUICK_SCRUB_BUTTON = 12; CLEAR_ALL_BUTTON = 13; CANCEL_TARGET = 14; Loading @@ -114,6 +114,7 @@ enum ControlType { SPLIT_SCREEN_TARGET = 16; REMOTE_ACTION_SHORTCUT = 17; APP_USAGE_SETTINGS = 18; BACK_GESTURE = 19; } enum TipType { Loading quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java +5 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,11 @@ public final class FallbackActivityControllerHelper implements @Override public int getContainerType() { return LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER; RecentsActivity activity = getCreatedActivity(); boolean visible = activity != null && activity.isStarted() && activity.hasWindowFocus(); return visible ? LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER : LauncherLogProto.ContainerType.APP; } @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.Utilities; import com.android.launcher3.compat.UserManagerCompat; import com.android.launcher3.logging.EventLogArray; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.util.LooperExecutor; import com.android.launcher3.util.UiThreadHelper; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -141,6 +142,14 @@ public class TouchInteractionService extends Service implements }); } public void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) { final ActivityControlHelper activityControl = mOverviewComponentObserver.getActivityControlHelper(); UserEventDispatcher.newInstance(getBaseContext()).logActionBack(completed, downX, downY, isButton, gestureSwipeLeft, activityControl.getContainerType()); } /** Deprecated methods **/ public void onQuickStep(MotionEvent motionEvent) { } Loading src/com/android/launcher3/logging/UserEventDispatcher.java +23 −4 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ import android.content.SharedPreferences; import android.os.SystemClock; import android.util.Log; import android.view.View; import android.view.ViewParent; import androidx.annotation.Nullable; import com.android.launcher3.DropTarget; import com.android.launcher3.ItemInfo; Loading @@ -54,15 +55,12 @@ import com.android.launcher3.util.ResourceBasedOverride; import java.util.Locale; import java.util.UUID; import androidx.annotation.Nullable; /** * Manages the creation of {@link LauncherEvent}. * To debug this class, execute following command before side loading a new apk. * * $ adb shell setprop log.tag.UserEvent VERBOSE */ @Deprecated public class UserEventDispatcher implements ResourceBasedOverride { private static final String TAG = "UserEvent"; Loading Loading @@ -360,6 +358,27 @@ public class UserEventDispatcher implements ResourceBasedOverride { dispatchUserEvent(event, null); } public void logActionBack(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft, int containerType) { int actionTouch = isButton ? Action.Touch.TAP : Action.Touch.SWIPE; Action action = newCommandAction(actionTouch); action.command = Action.Command.BACK; action.dir = isButton ? Action.Direction.NONE : gestureSwipeLeft ? Action.Direction.LEFT : Action.Direction.RIGHT; Target target = newControlTarget(isButton ? LauncherLogProto.ControlType.BACK_BUTTON : LauncherLogProto.ControlType.BACK_GESTURE); target.spanX = downX; target.spanY = downY; target.cardinality = completed ? 1 : 0; LauncherEvent event = newLauncherEvent(action, target, newContainerTarget(containerType)); dispatchUserEvent(event, null); } /** * Currently logs following containers: workspace, allapps, widget tray. * @param reason Loading Loading
go/quickstep/src/com/android/quickstep/TouchInteractionService.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ public class TouchInteractionService extends Service { // TODO handle assistant } public void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) { } /** Deprecated methods **/ public void onQuickStep(MotionEvent motionEvent) { } Loading
protos/launcher_log.proto +2 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ enum ControlType { RESIZE_HANDLE = 8; VERTICAL_SCROLL = 9; HOME_INTENT = 10; // Deprecated, use enum Command instead BACK_BUTTON = 11; // Deprecated, use enum Command instead BACK_BUTTON = 11; QUICK_SCRUB_BUTTON = 12; CLEAR_ALL_BUTTON = 13; CANCEL_TARGET = 14; Loading @@ -114,6 +114,7 @@ enum ControlType { SPLIT_SCREEN_TARGET = 16; REMOTE_ACTION_SHORTCUT = 17; APP_USAGE_SETTINGS = 18; BACK_GESTURE = 19; } enum TipType { Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java +5 −1 Original line number Diff line number Diff line Loading @@ -192,7 +192,11 @@ public final class FallbackActivityControllerHelper implements @Override public int getContainerType() { return LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER; RecentsActivity activity = getCreatedActivity(); boolean visible = activity != null && activity.isStarted() && activity.hasWindowFocus(); return visible ? LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER : LauncherLogProto.ContainerType.APP; } @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TouchInteractionService.java +9 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ import com.android.launcher3.MainThreadExecutor; import com.android.launcher3.Utilities; import com.android.launcher3.compat.UserManagerCompat; import com.android.launcher3.logging.EventLogArray; import com.android.launcher3.logging.UserEventDispatcher; import com.android.launcher3.util.LooperExecutor; import com.android.launcher3.util.UiThreadHelper; import com.android.quickstep.SysUINavigationMode.Mode; Loading Loading @@ -141,6 +142,14 @@ public class TouchInteractionService extends Service implements }); } public void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) { final ActivityControlHelper activityControl = mOverviewComponentObserver.getActivityControlHelper(); UserEventDispatcher.newInstance(getBaseContext()).logActionBack(completed, downX, downY, isButton, gestureSwipeLeft, activityControl.getContainerType()); } /** Deprecated methods **/ public void onQuickStep(MotionEvent motionEvent) { } Loading
src/com/android/launcher3/logging/UserEventDispatcher.java +23 −4 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ import android.content.SharedPreferences; import android.os.SystemClock; import android.util.Log; import android.view.View; import android.view.ViewParent; import androidx.annotation.Nullable; import com.android.launcher3.DropTarget; import com.android.launcher3.ItemInfo; Loading @@ -54,15 +55,12 @@ import com.android.launcher3.util.ResourceBasedOverride; import java.util.Locale; import java.util.UUID; import androidx.annotation.Nullable; /** * Manages the creation of {@link LauncherEvent}. * To debug this class, execute following command before side loading a new apk. * * $ adb shell setprop log.tag.UserEvent VERBOSE */ @Deprecated public class UserEventDispatcher implements ResourceBasedOverride { private static final String TAG = "UserEvent"; Loading Loading @@ -360,6 +358,27 @@ public class UserEventDispatcher implements ResourceBasedOverride { dispatchUserEvent(event, null); } public void logActionBack(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft, int containerType) { int actionTouch = isButton ? Action.Touch.TAP : Action.Touch.SWIPE; Action action = newCommandAction(actionTouch); action.command = Action.Command.BACK; action.dir = isButton ? Action.Direction.NONE : gestureSwipeLeft ? Action.Direction.LEFT : Action.Direction.RIGHT; Target target = newControlTarget(isButton ? LauncherLogProto.ControlType.BACK_BUTTON : LauncherLogProto.ControlType.BACK_GESTURE); target.spanX = downX; target.spanY = downY; target.cardinality = completed ? 1 : 0; LauncherEvent event = newLauncherEvent(action, target, newContainerTarget(containerType)); dispatchUserEvent(event, null); } /** * Currently logs following containers: workspace, allapps, widget tray. * @param reason Loading