Log when taskbar is in task switcher container.

Test: wwdebug & wwlogcat
Bug: 261177876
Change-Id: Id4eda7ee7e4e2c1aa60e07d5b65410b3847d9ac6
This commit is contained in:
Brian Isganitis 2023-03-04 01:42:26 +00:00
parent a176ad060f
commit c762ef68d4
5 changed files with 28 additions and 8 deletions

View File

@ -128,6 +128,11 @@ message TaskBarContainer {
// Bit encoded value to capture pinned and predicted taskbar positions. // Bit encoded value to capture pinned and predicted taskbar positions.
optional int32 cardinality = 2; optional int32 cardinality = 2;
// Container where taskbar was invoked.
oneof ParentContainer {
TaskSwitcherContainer task_switcher_container = 3;
}
} }
// Next value 44 // Next value 44

View File

@ -348,6 +348,11 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
.getValue() == 0; .getValue() == 0;
} }
@Override
protected boolean isInOverview() {
return mTaskbarLauncherStateController.isInOverview();
}
@Override @Override
public RecentsView getRecentsView() { public RecentsView getRecentsView() {
return mLauncher.getOverviewPanel(); return mLauncher.getOverviewPanel();

View File

@ -432,11 +432,16 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
} }
LauncherAtom.ContainerInfo oldContainer = itemInfoBuilder.getContainerInfo(); LauncherAtom.ContainerInfo oldContainer = itemInfoBuilder.getContainerInfo();
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
LauncherAtom.TaskBarContainer.newBuilder();
if (mControllers.uiController.isInOverview()) {
taskbarBuilder.setTaskSwitcherContainer(
LauncherAtom.TaskSwitcherContainer.newBuilder());
}
if (oldContainer.hasPredictedHotseatContainer()) { if (oldContainer.hasPredictedHotseatContainer()) {
LauncherAtom.PredictedHotseatContainer predictedHotseat = LauncherAtom.PredictedHotseatContainer predictedHotseat =
oldContainer.getPredictedHotseatContainer(); oldContainer.getPredictedHotseatContainer();
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
LauncherAtom.TaskBarContainer.newBuilder();
if (predictedHotseat.hasIndex()) { if (predictedHotseat.hasIndex()) {
taskbarBuilder.setIndex(predictedHotseat.getIndex()); taskbarBuilder.setIndex(predictedHotseat.getIndex());
@ -449,8 +454,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
.setTaskBarContainer(taskbarBuilder)); .setTaskBarContainer(taskbarBuilder));
} else if (oldContainer.hasHotseat()) { } else if (oldContainer.hasHotseat()) {
LauncherAtom.HotseatContainer hotseat = oldContainer.getHotseat(); LauncherAtom.HotseatContainer hotseat = oldContainer.getHotseat();
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
LauncherAtom.TaskBarContainer.newBuilder();
if (hotseat.hasIndex()) { if (hotseat.hasIndex()) {
taskbarBuilder.setIndex(hotseat.getIndex()); taskbarBuilder.setIndex(hotseat.getIndex());
@ -462,8 +465,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
LauncherAtom.FolderContainer.Builder folderBuilder = oldContainer.getFolder() LauncherAtom.FolderContainer.Builder folderBuilder = oldContainer.getFolder()
.toBuilder(); .toBuilder();
LauncherAtom.HotseatContainer hotseat = folderBuilder.getHotseat(); LauncherAtom.HotseatContainer hotseat = folderBuilder.getHotseat();
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
LauncherAtom.TaskBarContainer.newBuilder();
if (hotseat.hasIndex()) { if (hotseat.hasIndex()) {
taskbarBuilder.setIndex(hotseat.getIndex()); taskbarBuilder.setIndex(hotseat.getIndex());
@ -476,11 +477,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
} else if (oldContainer.hasAllAppsContainer()) { } else if (oldContainer.hasAllAppsContainer()) {
itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder() itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
.setAllAppsContainer(oldContainer.getAllAppsContainer().toBuilder() .setAllAppsContainer(oldContainer.getAllAppsContainer().toBuilder()
.setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder()))); .setTaskbarContainer(taskbarBuilder)));
} else if (oldContainer.hasPredictionContainer()) { } else if (oldContainer.hasPredictionContainer()) {
itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder() itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
.setPredictionContainer(oldContainer.getPredictionContainer().toBuilder() .setPredictionContainer(oldContainer.getPredictionContainer().toBuilder()
.setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder()))); .setTaskbarContainer(taskbarBuilder)));
} }
} }

View File

@ -406,6 +406,10 @@ import java.util.StringJoiner;
return mLauncherState != LauncherState.ALL_APPS; return mLauncherState != LauncherState.ALL_APPS;
} }
boolean isInOverview() {
return mLauncherState == LauncherState.OVERVIEW;
}
private void playStateTransitionAnim(AnimatorSet animatorSet, long duration, private void playStateTransitionAnim(AnimatorSet animatorSet, long duration,
boolean committed) { boolean committed) {
boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher); boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);

View File

@ -166,6 +166,11 @@ public class TaskbarUIController {
return true; return true;
} }
/** Returns {@code true} if Taskbar is currently within overview. */
protected boolean isInOverview() {
return false;
}
@CallSuper @CallSuper
protected void dumpLogs(String prefix, PrintWriter pw) { protected void dumpLogs(String prefix, PrintWriter pw) {
pw.println(String.format( pw.println(String.format(