Merge "Log the input type for gesture nav gestures" into udc-dev
This commit is contained in:
@@ -135,6 +135,7 @@ import com.android.systemui.shared.recents.model.ThumbnailData;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.InputConsumerController;
|
||||
import com.android.systemui.shared.system.InteractionJankMonitorWrapper;
|
||||
import com.android.systemui.shared.system.SysUiStatsLog;
|
||||
import com.android.systemui.shared.system.TaskStackChangeListener;
|
||||
import com.android.systemui.shared.system.TaskStackChangeListeners;
|
||||
import com.android.wm.shell.common.TransactionPool;
|
||||
@@ -1345,7 +1346,10 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
}
|
||||
StatsLogger logger = StatsLogManager.newInstance(mContext).logger()
|
||||
.withSrcState(LAUNCHER_STATE_BACKGROUND)
|
||||
.withDstState(endTarget.containerType);
|
||||
.withDstState(endTarget.containerType)
|
||||
.withInputType(mGestureState.isTrackpadGesture()
|
||||
? SysUiStatsLog.LAUNCHER_UICHANGED__INPUT_TYPE__TRACKPAD
|
||||
: SysUiStatsLog.LAUNCHER_UICHANGED__INPUT_TYPE__TOUCH);
|
||||
if (targetTask != null) {
|
||||
logger.withItemInfo(targetTask.getItemInfo());
|
||||
}
|
||||
|
||||
@@ -227,6 +227,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
private SliceItem mSliceItem;
|
||||
private LauncherAtom.Slice mSlice;
|
||||
private Optional<Integer> mCardinality = Optional.empty();
|
||||
private int mInputType = SysUiStatsLog.LAUNCHER_UICHANGED__INPUT_TYPE__UNKNOWN;
|
||||
|
||||
StatsCompatLogger(Context context, ActivityContext activityContext) {
|
||||
mContext = context;
|
||||
@@ -319,6 +320,12 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsLogger withInputType(int inputType) {
|
||||
this.mInputType = inputType;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(EventEnum event) {
|
||||
if (!Utilities.ATLEAST_R) {
|
||||
@@ -413,6 +420,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
InstanceId instanceId = mInstanceId;
|
||||
int srcState = mSrcState;
|
||||
int dstState = mDstState;
|
||||
int inputType = mInputType;
|
||||
if (IS_VERBOSE) {
|
||||
String name = (event instanceof Enum) ? ((Enum) event).name() :
|
||||
event.getId() + "";
|
||||
@@ -470,7 +478,8 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
cardinality /* cardinality */,
|
||||
getFeatures(atomInfo) /* features */,
|
||||
getSearchAttributes(atomInfo) /* searchAttributes */,
|
||||
getAttributes(atomInfo) /* attributes */
|
||||
getAttributes(atomInfo) /* attributes */,
|
||||
inputType /* input_type */
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -769,6 +769,13 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the input type of the log message.
|
||||
*/
|
||||
default StatsLogger withInputType(int inputType) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the final message and logs it as {@link EventEnum}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user