mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-18 18:28:20 +00:00
Add logs for taskbar and overview split action
Log: - Taskbar app launch (also from foldeR) - Taskbar app drag (also from folder) - Taskbar folder open - Long press to hide taskbar - Long press to show taskbar - Overview Split screen action Also add support for ActivityContext to overwrite/add to LauncherAtom.ItemInfo, which TaskbarActivityContext does to change HotseatContainer and PredictedHotseatContainer to TaskBarContainer Test: enable logcat locally Bug: 193009817 Change-Id: Ia82c846a727fecb8cbfd0a069c8af1276083bf83
This commit is contained in:
@@ -55,6 +55,7 @@ import com.android.launcher3.allapps.search.DefaultSearchAdapterProvider;
|
||||
import com.android.launcher3.allapps.search.SearchAdapterProvider;
|
||||
import com.android.launcher3.logging.InstanceId;
|
||||
import com.android.launcher3.logging.InstanceIdSequence;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.model.data.WorkspaceItemInfo;
|
||||
import com.android.launcher3.touch.ItemClickHandler;
|
||||
@@ -224,7 +225,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
}
|
||||
if (item != null) {
|
||||
InstanceId instanceId = new InstanceIdSequence().newInstanceId();
|
||||
logAppLaunch(item, instanceId);
|
||||
logAppLaunch(getStatsLogManager(), item, instanceId);
|
||||
}
|
||||
return true;
|
||||
} catch (NullPointerException | ActivityNotFoundException | SecurityException e) {
|
||||
@@ -234,8 +235,12 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void logAppLaunch(ItemInfo info, InstanceId instanceId) {
|
||||
getStatsLogManager().logger().withItemInfo(info).withInstanceId(instanceId)
|
||||
/**
|
||||
* Creates and logs a new app launch event.
|
||||
*/
|
||||
public void logAppLaunch(StatsLogManager statsLogManager, ItemInfo info,
|
||||
InstanceId instanceId) {
|
||||
statsLogManager.logger().withItemInfo(info).withInstanceId(instanceId)
|
||||
.log(LAUNCHER_APP_LAUNCH_TAP);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user