mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
[WW logging] Log rankings for app launches
Bug: 158219113 Change-Id: Ib6db4e73e48ff27ca9d3a5348eea42e1f534dba1
This commit is contained in:
@@ -43,6 +43,8 @@ import android.widget.Toast;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.LauncherSettings.Favorites;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
import com.android.launcher3.logging.InstanceIdSequence;
|
||||
import com.android.launcher3.model.AppLaunchTracker;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
@@ -188,7 +190,8 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
}
|
||||
getUserEventDispatcher().logAppLaunch(v, intent, user);
|
||||
if (item != null) {
|
||||
getStatsLogManager().log(LAUNCHER_APP_LAUNCH_TAP, item);
|
||||
InstanceId instanceId = new InstanceIdSequence().newInstanceId();
|
||||
logAppLaunch(item, instanceId);
|
||||
}
|
||||
return true;
|
||||
} catch (NullPointerException|ActivityNotFoundException|SecurityException e) {
|
||||
@@ -198,6 +201,10 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void logAppLaunch(ItemInfo info, InstanceId instanceId) {
|
||||
getStatsLogManager().log(LAUNCHER_APP_LAUNCH_TAP, instanceId, info);
|
||||
}
|
||||
|
||||
private void startShortcutIntentSafely(Intent intent, Bundle optsBundle, ItemInfo info,
|
||||
@Nullable String sourceContainer) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user