mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-05 02:16:49 +00:00
Adds PredictedHotseatContainer to launcher_atom.proto am: 18c2495b8f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/11825364 Change-Id: I4094d1a5efc572806acb0f3f257fc7497be06446
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user