Search in sources :

Example 26 with ContainerType

use of com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType in project android_packages_apps_Launcher3 by AOSPA.

the class OverviewWithoutFocusInputConsumer method onSwipeUp.

@Override
public void onSwipeUp(boolean wasFling, PointF finalVelocity) {
    try {
        mContext.startActivity(mGestureState.getHomeIntent());
    } catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
        mContext.startActivity(createHomeIntent());
    }
    ActiveGestureLog.INSTANCE.addLog("startQuickstep");
    BaseActivity activity = BaseDraggingActivity.fromContext(mContext);
    int state = (mGestureState != null && mGestureState.getEndTarget() != null) ? mGestureState.getEndTarget().containerType : LAUNCHER_STATE_HOME;
    activity.getStatsLogManager().logger().withSrcState(LAUNCHER_STATE_BACKGROUND).withDstState(state).withContainerInfo(LauncherAtom.ContainerInfo.newBuilder().setWorkspace(LauncherAtom.WorkspaceContainer.newBuilder().setPageIndex(-1)).build()).log(LAUNCHER_HOME_GESTURE);
}
Also used : ActivityNotFoundException(android.content.ActivityNotFoundException) BaseActivity(com.android.launcher3.BaseActivity)

Aggregations

LoggerUtils.newLauncherEvent (com.android.launcher3.logging.LoggerUtils.newLauncherEvent)8 LauncherEvent (com.android.launcher3.userevent.nano.LauncherLogProto.LauncherEvent)8 BaseActivity (com.android.launcher3.BaseActivity)7 LauncherState (com.android.launcher3.LauncherState)7 Target (com.android.launcher3.userevent.nano.LauncherLogProto.Target)6 ActivityNotFoundException (android.content.ActivityNotFoundException)5 LoggerUtils.newContainerTarget (com.android.launcher3.logging.LoggerUtils.newContainerTarget)4 LoggerUtils.newTarget (com.android.launcher3.logging.LoggerUtils.newTarget)3 ButtonDropTarget (com.android.launcher3.ButtonDropTarget)2 DropTarget (com.android.launcher3.DropTarget)2 LoggerUtils.newAction (com.android.launcher3.logging.LoggerUtils.newAction)2 LoggerUtils.newCommandAction (com.android.launcher3.logging.LoggerUtils.newCommandAction)2 LoggerUtils.newControlTarget (com.android.launcher3.logging.LoggerUtils.newControlTarget)2 LoggerUtils.newDropTarget (com.android.launcher3.logging.LoggerUtils.newDropTarget)2 LoggerUtils.newItemTarget (com.android.launcher3.logging.LoggerUtils.newItemTarget)2 LoggerUtils.newTouchAction (com.android.launcher3.logging.LoggerUtils.newTouchAction)2 UserEventDispatcher (com.android.launcher3.logging.UserEventDispatcher)2 Action (com.android.launcher3.userevent.nano.LauncherLogProto.Action)2 AppWidgetHostView (android.appwidget.AppWidgetHostView)1 Intent (android.content.Intent)1