mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Fix bug where Taskbar was not auto-hiding after splitscreen launch from icon menu
This patch fixes a bug where the transient Taskbar was not hiding properly after splitscreen was initiated. When the user is inside an app and launches splitscreen by longpressing on a Taskbar icon and selecting the split button, the transient Taskbar should hide right away. This is an equivalent action to dragging the Taskbar icon up to create a split, and should hide the Taskbar so that other UI elements (like system-level toasts and error messages) can be seen. The bug occurred because updateAndAnimateTransientTaskbar() is not being called in this specific code path to stash the Taskbar. Fixed by adding a new call to updateAndAnimateTransientTaskbar upon clicking the splitscreen menu button. Fixes: 272292897 Test: Manual Change-Id: I64a9acfc41ddcaba4d9f43eb216458de44b4c9a4
This commit is contained in:
@@ -65,6 +65,7 @@ import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* Implements interfaces required to show and allow interacting with a PopupContainerWithArrow.
|
||||
* Controls the long-press menu on Taskbar and AllApps icons.
|
||||
*/
|
||||
public class TaskbarPopupController implements TaskbarControllers.LoggableTaskbarController {
|
||||
|
||||
@@ -190,9 +191,8 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
|
||||
|
||||
// Make focusable to receive back events
|
||||
context.onPopupVisibilityChanged(true);
|
||||
container.setOnCloseCallback(() -> {
|
||||
container.addOnCloseCallback(() -> {
|
||||
context.getDragLayer().post(() -> context.onPopupVisibilityChanged(false));
|
||||
container.setOnCloseCallback(null);
|
||||
});
|
||||
|
||||
return container;
|
||||
@@ -293,13 +293,19 @@ public class TaskbarPopupController implements TaskbarControllers.LoggableTaskba
|
||||
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
// Add callbacks depending on what type of Taskbar context we're in (Taskbar or AllApps)
|
||||
mTarget.onSplitScreenMenuButtonClicked();
|
||||
AbstractFloatingView.closeAllOpenViews(mTarget);
|
||||
|
||||
// Depending on what app state we're in, we either want to initiate the split screen
|
||||
// staging process or immediately launch a split with an existing app.
|
||||
// - Initiate the split screen staging process
|
||||
if (mAllowInitialSplitSelection) {
|
||||
super.onClick(view);
|
||||
return;
|
||||
}
|
||||
|
||||
// Initiate splitscreen from the in-app Taskbar or Taskbar All Apps
|
||||
// - Immediately launch split with the running app
|
||||
Pair<InstanceId, com.android.launcher3.logging.InstanceId> instanceIds =
|
||||
LogUtils.getShellShareableInstanceId();
|
||||
mTarget.getStatsLogManager().logger()
|
||||
|
||||
Reference in New Issue
Block a user