Search in sources :

Example 11 with LAUNCHER_STATE_BACKGROUND

use of com.android.launcher3.logging.StatsLogManager.LAUNCHER_STATE_BACKGROUND 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

DeviceProfile (com.android.launcher3.DeviceProfile)6 StatsLogManager (com.android.launcher3.logging.StatsLogManager)6 ActivityNotFoundException (android.content.ActivityNotFoundException)5 BaseActivity (com.android.launcher3.BaseActivity)5 StatsLogger (com.android.launcher3.logging.StatsLogManager.StatsLogger)5 ComponentName (android.content.ComponentName)1