Log when taskbar is in task switcher container.
Test: wwdebug & wwlogcat Bug: 261177876 Change-Id: Id4eda7ee7e4e2c1aa60e07d5b65410b3847d9ac6
This commit is contained in:
parent
a176ad060f
commit
c762ef68d4
|
@ -128,6 +128,11 @@ message TaskBarContainer {
|
|||
|
||||
// Bit encoded value to capture pinned and predicted taskbar positions.
|
||||
optional int32 cardinality = 2;
|
||||
|
||||
// Container where taskbar was invoked.
|
||||
oneof ParentContainer {
|
||||
TaskSwitcherContainer task_switcher_container = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// Next value 44
|
||||
|
|
|
@ -348,6 +348,11 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
|
|||
.getValue() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isInOverview() {
|
||||
return mTaskbarLauncherStateController.isInOverview();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecentsView getRecentsView() {
|
||||
return mLauncher.getOverviewPanel();
|
||||
|
|
|
@ -432,11 +432,16 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
|||
}
|
||||
LauncherAtom.ContainerInfo oldContainer = itemInfoBuilder.getContainerInfo();
|
||||
|
||||
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
|
||||
LauncherAtom.TaskBarContainer.newBuilder();
|
||||
if (mControllers.uiController.isInOverview()) {
|
||||
taskbarBuilder.setTaskSwitcherContainer(
|
||||
LauncherAtom.TaskSwitcherContainer.newBuilder());
|
||||
}
|
||||
|
||||
if (oldContainer.hasPredictedHotseatContainer()) {
|
||||
LauncherAtom.PredictedHotseatContainer predictedHotseat =
|
||||
oldContainer.getPredictedHotseatContainer();
|
||||
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
|
||||
LauncherAtom.TaskBarContainer.newBuilder();
|
||||
|
||||
if (predictedHotseat.hasIndex()) {
|
||||
taskbarBuilder.setIndex(predictedHotseat.getIndex());
|
||||
|
@ -449,8 +454,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
|||
.setTaskBarContainer(taskbarBuilder));
|
||||
} else if (oldContainer.hasHotseat()) {
|
||||
LauncherAtom.HotseatContainer hotseat = oldContainer.getHotseat();
|
||||
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
|
||||
LauncherAtom.TaskBarContainer.newBuilder();
|
||||
|
||||
if (hotseat.hasIndex()) {
|
||||
taskbarBuilder.setIndex(hotseat.getIndex());
|
||||
|
@ -462,8 +465,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
|||
LauncherAtom.FolderContainer.Builder folderBuilder = oldContainer.getFolder()
|
||||
.toBuilder();
|
||||
LauncherAtom.HotseatContainer hotseat = folderBuilder.getHotseat();
|
||||
LauncherAtom.TaskBarContainer.Builder taskbarBuilder =
|
||||
LauncherAtom.TaskBarContainer.newBuilder();
|
||||
|
||||
if (hotseat.hasIndex()) {
|
||||
taskbarBuilder.setIndex(hotseat.getIndex());
|
||||
|
@ -476,11 +477,11 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
|
|||
} else if (oldContainer.hasAllAppsContainer()) {
|
||||
itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
|
||||
.setAllAppsContainer(oldContainer.getAllAppsContainer().toBuilder()
|
||||
.setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder())));
|
||||
.setTaskbarContainer(taskbarBuilder)));
|
||||
} else if (oldContainer.hasPredictionContainer()) {
|
||||
itemInfoBuilder.setContainerInfo(LauncherAtom.ContainerInfo.newBuilder()
|
||||
.setPredictionContainer(oldContainer.getPredictionContainer().toBuilder()
|
||||
.setTaskbarContainer(LauncherAtom.TaskBarContainer.newBuilder())));
|
||||
.setTaskbarContainer(taskbarBuilder)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -406,6 +406,10 @@ import java.util.StringJoiner;
|
|||
return mLauncherState != LauncherState.ALL_APPS;
|
||||
}
|
||||
|
||||
boolean isInOverview() {
|
||||
return mLauncherState == LauncherState.OVERVIEW;
|
||||
}
|
||||
|
||||
private void playStateTransitionAnim(AnimatorSet animatorSet, long duration,
|
||||
boolean committed) {
|
||||
boolean isInStashedState = mLauncherState.isTaskbarStashed(mLauncher);
|
||||
|
|
|
@ -166,6 +166,11 @@ public class TaskbarUIController {
|
|||
return true;
|
||||
}
|
||||
|
||||
/** Returns {@code true} if Taskbar is currently within overview. */
|
||||
protected boolean isInOverview() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@CallSuper
|
||||
protected void dumpLogs(String prefix, PrintWriter pw) {
|
||||
pw.println(String.format(
|
||||
|
|
Loading…
Reference in New Issue