Fix issue with quickswitch not updating system bar flags

- Separate the calls to minimize split and to update the flags (we only
  want to minimize in split when swiping up, but we want to update the
  flags when quickswitching as well)

Bug: 155410195
Change-Id: I56308cc0fbaa8a855383012738f129671d72feff
This commit is contained in:
Winson Chung
2020-04-30 11:26:08 -07:00
parent 0199fa46de
commit a7ac7192c3
8 changed files with 51 additions and 31 deletions

View File

@@ -19,13 +19,11 @@ import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import android.graphics.Rect;
import android.util.ArraySet;
import android.util.Log;
import androidx.annotation.BinderThread;
import androidx.annotation.UiThread;
import com.android.launcher3.Utilities;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.util.Preconditions;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
@@ -41,15 +39,15 @@ public class RecentsAnimationCallbacks implements
com.android.systemui.shared.system.RecentsAnimationListener {
private final Set<RecentsAnimationListener> mListeners = new ArraySet<>();
private final boolean mShouldMinimizeSplitScreen;
private final boolean mAllowMinimizeSplitScreen;
// TODO(141886704): Remove these references when they are no longer needed
private RecentsAnimationController mController;
private boolean mCancelled;
public RecentsAnimationCallbacks(boolean shouldMinimizeSplitScreen) {
mShouldMinimizeSplitScreen = shouldMinimizeSplitScreen;
public RecentsAnimationCallbacks(boolean allowMinimizeSplitScreen) {
mAllowMinimizeSplitScreen = allowMinimizeSplitScreen;
}
@UiThread
@@ -94,7 +92,7 @@ public class RecentsAnimationCallbacks implements
RecentsAnimationTargets targets = new RecentsAnimationTargets(appTargets,
wallpaperTargets, homeContentInsets, minimizedHomeBounds);
mController = new RecentsAnimationController(animationController,
mShouldMinimizeSplitScreen, this::onAnimationFinished);
mAllowMinimizeSplitScreen, this::onAnimationFinished);
if (mCancelled) {
Utilities.postAsyncCallback(MAIN_EXECUTOR.getHandler(),