Update StatsLogManager to support ranking related events.

Change-Id: I238f00a782a620f704005d37c8972b5e25610c75
This commit is contained in:
thiruram
2020-06-09 17:24:29 -07:00
committed by Thiru Ramasamy
parent 23986e9a84
commit 236f40d97e
2 changed files with 45 additions and 0 deletions

View File

@@ -141,6 +141,25 @@ public class StatsLogManager implements ResourceBasedOverride {
}
}
/**
* Launcher specific ranking related events.
*/
public enum LauncherRankingEvent implements EventEnum {
UNKNOWN(0);
// ADD MORE
private final int mId;
LauncherRankingEvent(int id) {
mId = id;
}
public int getId() {
return mId;
}
}
protected LogStateProvider mStateProvider;
/**
@@ -181,6 +200,19 @@ public class StatsLogManager implements ResourceBasedOverride {
public void log(EventEnum event, InstanceId instanceId, @Nullable ItemInfo itemInfo) {
}
/**
* Log an event with ranked-choice information along with package. Does nothing if event.getId()
* <= 0.
*
* @param rankingEvent an enum implementing UiEventEnum interface.
* @param instanceId An identifier obtained from an InstanceIdSequence.
* @param packageName the package name of the relevant app, if known (null otherwise).
* @param position the position picked.
*/
public void log(EventEnum rankingEvent, InstanceId instanceId, @Nullable String packageName,
int position) {
}
/**
* Logs an event and accompanying {@link LauncherState}s. If either of the state refers
* to workspace state, then use pageIndex to pass in index of workspace.