mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Update StatsLogManager to support ranking related events.
Change-Id: I238f00a782a620f704005d37c8972b5e25610c75
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user