Modify Taskbar code to accommodate bubble bar gesture to stash/unstash
* Bubble bar typically follows the behavior of taskbar - if taskbar is shown, the bubble bar is shown, if taskbar hides, bubble bar hides. * The bubble bar has 3 states: stashed, collapsed (unstashed but the bubbles are not expanded), and expanded. When bubbles are expanded, this means WMShell is rendering the bubble expanded view. In this situation taskbar becomes collapsed. Bug: 253318833 Test: manual, with other CLs, see go/bubble-bar-tests Flag: WM_BUBBLE_BAR Change-Id: Ic210c382e7482c259ae543a0dc083fe9305cbf5b
This commit is contained in:
1 parent
39e28c9190
commit
7344766886
10 files changed
+188
-37
No files matched your search
@@ -28,6 +28,8 @@ import com.android.launcher3.R;
|
||||
import com.android.launcher3.anim.AnimatedFloat;
|
||||
import com.android.launcher3.taskbar.TaskbarActivityContext;
|
||||
import com.android.launcher3.taskbar.TaskbarControllers;
|
||||
import com.android.launcher3.taskbar.TaskbarInsetsController;
|
||||
import com.android.launcher3.taskbar.TaskbarStashController;
|
||||
import com.android.launcher3.util.MultiPropertyFactory;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.quickstep.SystemUiProxy;
|
||||
@@ -51,6 +53,8 @@ public class BubbleBarViewController {
|
||||
// Initialized in init.
|
||||
private BubbleStashController mBubbleStashController;
|
||||
private BubbleBarController mBubbleBarController;
|
||||
private TaskbarStashController mTaskbarStashController;
|
||||
private TaskbarInsetsController mTaskbarInsetsController;
|
||||
private View.OnClickListener mBubbleClickListener;
|
||||
private View.OnClickListener mBubbleBarClickListener;
|
||||
|
||||
@@ -80,6 +84,8 @@ public class BubbleBarViewController {
|
||||
public void init(TaskbarControllers controllers, BubbleControllers bubbleControllers) {
|
||||
mBubbleStashController = bubbleControllers.bubbleStashController;
|
||||
mBubbleBarController = bubbleControllers.bubbleBarController;
|
||||
mTaskbarStashController = controllers.taskbarStashController;
|
||||
mTaskbarInsetsController = controllers.taskbarInsetsController;
|
||||
|
||||
mActivity.addOnDeviceProfileChangeListener(dp ->
|
||||
mBarView.getLayoutParams().height = mActivity.getDeviceProfile().taskbarHeight
|
||||
@@ -89,7 +95,9 @@ public class BubbleBarViewController {
|
||||
mBubbleClickListener = v -> onBubbleClicked(v);
|
||||
mBubbleBarClickListener = v -> setExpanded(true);
|
||||
mBarView.setOnClickListener(mBubbleBarClickListener);
|
||||
// TODO: when barView layout changes tell taskbarInsetsController the insets have changed.
|
||||
mBarView.addOnLayoutChangeListener((view, i, i1, i2, i3, i4, i5, i6, i7) ->
|
||||
mTaskbarInsetsController.onTaskbarOrBubblebarWindowHeightOrInsetsChanged()
|
||||
);
|
||||
}
|
||||
|
||||
private void onBubbleClicked(View v) {
|
||||
@@ -283,7 +291,8 @@ public class BubbleBarViewController {
|
||||
} else {
|
||||
Log.w(TAG, "trying to expand bubbles when there isn't one selected");
|
||||
}
|
||||
// TODO: Tell taskbar stash controller to stash without bubbles following
|
||||
mTaskbarStashController.updateAndAnimateTransientTaskbar(true /* stash */,
|
||||
false /* shouldBubblesFollow */);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user