Fixes missing WW logs for drag and drop events.
Change-Id: I31f8aa132d70b42c3b8213daf0bbd5c555cf3895
This commit is contained in:
parent
b0948db99d
commit
c85095b0e9
|
@ -17,7 +17,8 @@
|
|||
package com.android.quickstep.logging;
|
||||
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.FOLDER;
|
||||
import static com.android.launcher3.logger.LauncherAtom.ItemInfo.ItemCase.WIDGET;
|
||||
import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__BACKGROUND;
|
||||
import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__HOME;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
|
@ -84,17 +85,27 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||
*/
|
||||
@Override
|
||||
public void log(LauncherEvent event, @Nullable LauncherAtom.ItemInfo info) {
|
||||
logInternal(event, DEFAULT_INSTANCE_ID, info != null ? info
|
||||
: LauncherAtom.ItemInfo.getDefaultInstance(),
|
||||
SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__HOME,
|
||||
SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__BACKGROUND);
|
||||
log(event, DEFAULT_INSTANCE_ID, info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs an event and accompanying {@link InstanceId} and {@link LauncherAtom.ItemInfo}.
|
||||
*/
|
||||
@Override
|
||||
public void log(LauncherEvent event, InstanceId instanceId,
|
||||
@Nullable LauncherAtom.ItemInfo info) {
|
||||
logInternal(event, instanceId, info,
|
||||
LAUNCHER_UICHANGED__DST_STATE__HOME,
|
||||
LAUNCHER_UICHANGED__DST_STATE__BACKGROUND);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs an event and accompanying {@link InstanceId} and {@link LauncherAtom.ItemInfo}.
|
||||
*/
|
||||
private void logInternal(LauncherEvent event, InstanceId instanceId,
|
||||
LauncherAtom.ItemInfo info, int startState, int endState) {
|
||||
@Nullable LauncherAtom.ItemInfo info, int startState, int endState) {
|
||||
info = info == null ? LauncherAtom.ItemInfo.getDefaultInstance() : info;
|
||||
|
||||
if (IS_VERBOSE) {
|
||||
Log.d(TAG, instanceId == DEFAULT_INSTANCE_ID
|
||||
? String.format("\n%s\n%s", event.name(), info)
|
||||
|
|
|
@ -184,7 +184,7 @@ public abstract class BaseDraggingActivity extends BaseActivity
|
|||
}
|
||||
getUserEventDispatcher().logAppLaunch(v, intent, user);
|
||||
getStatsLogManager().log(LAUNCHER_APP_LAUNCH_TAP, item == null ? null
|
||||
: item.buildProto(null));
|
||||
: item.buildProto());
|
||||
return true;
|
||||
} catch (NullPointerException|ActivityNotFoundException|SecurityException e) {
|
||||
Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
|
||||
|
|
Loading…
Reference in New Issue