mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
[ShellTransition]: invoke WMS#setRecentsAppBehindSystemBars to WM
With enabling shell-transition, in case of seeing status bar icon blinking when hammer tapping on the navigation bar to trigger recents animation quickly as CL[1] mentioned, As the result, Launcher side still need to callback recents app behind system bar status to signal WM if launcher should affect system bar appearance with [1] introduced method setRecentsAppBehindSystemBars. Bug: 215504556 Test: manual as below steps 1) Launching a app 2) Hammer tapping on the navigation bar 3) Expect the staus bar icon won't blinking Change-Id: I4b41e06e559168a61a29fa6ea9f58b834a7f1a1c
This commit is contained in:
@@ -17,9 +17,13 @@ package com.android.quickstep;
|
||||
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.view.IRecentsAnimationController;
|
||||
import android.view.SurfaceControl;
|
||||
import android.view.WindowManagerGlobal;
|
||||
import android.window.PictureInPictureSurfaceTransaction;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -39,6 +43,7 @@ import java.util.function.Consumer;
|
||||
*/
|
||||
public class RecentsAnimationController {
|
||||
|
||||
private static final String TAG = "RecentsAnimationController";
|
||||
private final RecentsAnimationControllerCompat mController;
|
||||
private final Consumer<RecentsAnimationController> mOnFinishedListener;
|
||||
private final boolean mAllowMinimizeSplitScreen;
|
||||
@@ -74,7 +79,16 @@ public class RecentsAnimationController {
|
||||
if (mUseLauncherSysBarFlags != useLauncherSysBarFlags) {
|
||||
mUseLauncherSysBarFlags = useLauncherSysBarFlags;
|
||||
UI_HELPER_EXECUTOR.execute(() -> {
|
||||
mController.setAnimationTargetsBehindSystemBars(!useLauncherSysBarFlags);
|
||||
if (!ENABLE_SHELL_TRANSITIONS) {
|
||||
mController.setAnimationTargetsBehindSystemBars(!useLauncherSysBarFlags);
|
||||
} else {
|
||||
try {
|
||||
WindowManagerGlobal.getWindowManagerService().setRecentsAppBehindSystemBars(
|
||||
useLauncherSysBarFlags);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Unable to reach window manager", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user