Search in sources :

Example 6 with InstanceId

use of com.android.launcher3.logging.InstanceId in project android_packages_apps_Launcher3 by crdroidandroid.

the class QuickstepLauncher method logAppLaunch.

@Override
protected void logAppLaunch(ItemInfo info, InstanceId instanceId) {
    // LiveSearchManager to recreate the AllApps session on the server side.
    if (mAllAppsSessionLogId != null && ALL_APPS.equals(getStateManager().getCurrentStableState())) {
        instanceId = mAllAppsSessionLogId;
    }
    StatsLogger logger = getStatsLogManager().logger().withItemInfo(info).withInstanceId(instanceId);
    if (mAllAppsPredictions != null && (info.itemType == ITEM_TYPE_APPLICATION || info.itemType == ITEM_TYPE_SHORTCUT || info.itemType == ITEM_TYPE_DEEP_SHORTCUT)) {
        int count = mAllAppsPredictions.items.size();
        for (int i = 0; i < count; i++) {
            ItemInfo targetInfo = mAllAppsPredictions.items.get(i);
            if (targetInfo.itemType == info.itemType && targetInfo.user.equals(info.user) && Objects.equals(targetInfo.getIntent(), info.getIntent())) {
                logger.withRank(i);
                break;
            }
        }
    }
    logger.log(LAUNCHER_APP_LAUNCH_TAP);
    mHotseatPredictionController.logLaunchedAppRankingInfo(info, instanceId);
}
Also used : StatsLogger(com.android.launcher3.logging.StatsLogManager.StatsLogger) ItemInfo(com.android.launcher3.model.data.ItemInfo) WorkspaceItemInfo(com.android.launcher3.model.data.WorkspaceItemInfo)

Aggregations

WorkspaceItemInfo (com.android.launcher3.model.data.WorkspaceItemInfo)5 ItemInfo (com.android.launcher3.model.data.ItemInfo)3 InstanceId (com.android.launcher3.logging.InstanceId)2 InstanceIdSequence (com.android.launcher3.logging.InstanceIdSequence)2 StatsLogger (com.android.launcher3.logging.StatsLogManager.StatsLogger)2 FolderInfo (com.android.launcher3.model.data.FolderInfo)2 ActivityNotFoundException (android.content.ActivityNotFoundException)1 ComponentName (android.content.ComponentName)1 SharedPreferences (android.content.SharedPreferences)1 Bundle (android.os.Bundle)1 UserHandle (android.os.UserHandle)1 View (android.view.View)1 WorkerThread (androidx.annotation.WorkerThread)1 CellLayout (com.android.launcher3.CellLayout)1 DropTarget (com.android.launcher3.DropTarget)1 FromState (com.android.launcher3.logger.LauncherAtom.FromState)1 PredictedHotseatContainer (com.android.launcher3.logger.LauncherAtom.PredictedHotseatContainer)1 PredictedAppIcon (com.android.launcher3.uioverrides.PredictedAppIcon)1 Optional (java.util.Optional)1