mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 00:06:47 +00:00
Fix Keyboard quick switch screenshots and spliscreen launch
Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED Fixes: 312449590 Fixes: 292182490 Test: TaplTestsKeyboardQuickSwitch, keyboard quick switched with split app pairs Change-Id: I0faf2f7d58b39270ad6e5a065cf59f48e0dd23f0
This commit is contained in:
@@ -133,11 +133,20 @@ public class KeyboardQuickSwitchViewController {
|
||||
GroupTask task = mControllerCallbacks.getTaskAt(index);
|
||||
if (task == null) {
|
||||
return Math.max(0, index);
|
||||
} else if (mOnDesktop) {
|
||||
}
|
||||
Task task2 = task.task2;
|
||||
int runningTaskId = ActivityManagerWrapper.getInstance().getRunningTask().taskId;
|
||||
if (runningTaskId == task.task1.key.id
|
||||
|| (task2 != null && runningTaskId == task2.key.id)) {
|
||||
// Ignore attempts to run the selected task if it is already running.
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (mOnDesktop) {
|
||||
UI_HELPER_EXECUTOR.execute(() ->
|
||||
SystemUiProxy.INSTANCE.get(mKeyboardQuickSwitchView.getContext())
|
||||
.showDesktopApp(task.task1.key.id));
|
||||
} else if (task.task2 == null) {
|
||||
} else if (task2 == null) {
|
||||
UI_HELPER_EXECUTOR.execute(() ->
|
||||
ActivityManagerWrapper.getInstance().startActivityFromRecents(
|
||||
task.task1.key,
|
||||
@@ -145,8 +154,7 @@ public class KeyboardQuickSwitchViewController {
|
||||
taskView == null ? mKeyboardQuickSwitchView : taskView, null)
|
||||
.options));
|
||||
} else {
|
||||
mControllers.uiController.launchSplitTasks(
|
||||
taskView == null ? mKeyboardQuickSwitchView : taskView, task);
|
||||
mControllers.uiController.launchSplitTasks(task);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user