Adds PredictedHotseatContainer to launcher_atom.proto
Used for differentiating logs from normal hotseat and predicted hotseat. Bug: 158218197 Change-Id: I011ff724ea0916b32f680dc24e8d6090d3df766d
This commit is contained in:
parent
c11a808b99
commit
18c2495b8f
|
@ -53,6 +53,7 @@ message ContainerInfo {
|
|||
SearchResultContainer search_result_container = 7;
|
||||
ShortcutsContainer shortcuts_container = 8;
|
||||
SettingsContainer settings_container = 9;
|
||||
PredictedHotseatContainer predicted_hotseat_container = 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,6 +152,14 @@ message HotseatContainer {
|
|||
optional int32 index = 1;
|
||||
}
|
||||
|
||||
// Represents hotseat container with prediction feature enabled.
|
||||
message PredictedHotseatContainer {
|
||||
optional int32 index = 1;
|
||||
|
||||
// No of hotseat positions filled with predicted items.
|
||||
optional int32 cardinality = 2;
|
||||
}
|
||||
|
||||
message FolderContainer {
|
||||
optional int32 page_index = 1 [default = -1];
|
||||
optional int32 grid_x = 2 [default = -1];
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
package com.android.quickstep.logging;
|
||||
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.FOLDER;
|
||||
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo.ContainerCase.PREDICTED_HOTSEAT_CONTAINER;
|
||||
import static com.android.systemui.shared.system.SysUiStatsLog.LAUNCHER_UICHANGED__DST_STATE__ALLAPPS;
|
||||
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;
|
||||
|
@ -181,7 +182,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||
info.getFolderIcon().getFromLabelState().getNumber() /* fromState */,
|
||||
info.getFolderIcon().getToLabelState().getNumber() /* toState */,
|
||||
info.getFolderIcon().getLabelInfo() /* edittext */,
|
||||
info.getFolderIcon().getCardinality() /* cardinality */);
|
||||
getCardinality(info) /* cardinality */);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -245,11 +246,17 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||
getHierarchy(info) /* hierarchy */,
|
||||
info.getIsWork() /* is_work_profile */,
|
||||
info.getAttribute().getNumber() /* origin */,
|
||||
info.getFolderIcon().getCardinality() /* cardinality */,
|
||||
getCardinality(info) /* cardinality */,
|
||||
info.getWidget().getSpanX(),
|
||||
info.getWidget().getSpanY());
|
||||
}
|
||||
|
||||
private static int getCardinality(LauncherAtom.ItemInfo info) {
|
||||
return info.getContainerInfo().getContainerCase().equals(PREDICTED_HOTSEAT_CONTAINER)
|
||||
? info.getContainerInfo().getPredictedHotseatContainer().getCardinality()
|
||||
: info.getFolderIcon().getCardinality();
|
||||
}
|
||||
|
||||
private static String getPackageName(LauncherAtom.ItemInfo info) {
|
||||
switch (info.getItemCase()) {
|
||||
case APPLICATION:
|
||||
|
|
|
@ -337,10 +337,13 @@ public class ItemInfo {
|
|||
ContainerInfo getContainerInfo() {
|
||||
switch (container) {
|
||||
case CONTAINER_HOTSEAT:
|
||||
case CONTAINER_HOTSEAT_PREDICTION:
|
||||
return ContainerInfo.newBuilder()
|
||||
.setHotseat(LauncherAtom.HotseatContainer.newBuilder().setIndex(screenId))
|
||||
.build();
|
||||
case CONTAINER_HOTSEAT_PREDICTION:
|
||||
return ContainerInfo.newBuilder().setPredictedHotseatContainer(
|
||||
LauncherAtom.PredictedHotseatContainer.newBuilder().setIndex(screenId))
|
||||
.build();
|
||||
case CONTAINER_DESKTOP:
|
||||
return ContainerInfo.newBuilder()
|
||||
.setWorkspace(
|
||||
|
|
Loading…
Reference in New Issue