mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Merge "Update side stage outline visibility with swipe gesture" into sc-v2-dev
This commit is contained in:
@@ -789,7 +789,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
mRecentsAnimationStartCallbacks.clear();
|
||||
}
|
||||
|
||||
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, false);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, false);
|
||||
|
||||
// Only add the callback to enable the input consumer after we actually have the controller
|
||||
mStateCallback.runOnceAtState(STATE_APP_CONTROLLER_RECEIVED | STATE_GESTURE_STARTED,
|
||||
@@ -806,7 +806,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
mStateCallback.setStateOnUiThread(STATE_GESTURE_CANCELLED | STATE_HANDLER_INVALIDATED);
|
||||
|
||||
if (mRecentsAnimationTargets != null) {
|
||||
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, true);
|
||||
}
|
||||
|
||||
// Defer clearing the controller and the targets until after we've updated the state
|
||||
@@ -955,7 +955,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
} else {
|
||||
mStateCallback.setState(STATE_RESUME_LAST_TASK);
|
||||
}
|
||||
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(
|
||||
mRecentsAnimationTargets.nonApps, true);
|
||||
break;
|
||||
}
|
||||
ActiveGestureLog.INSTANCE.addLog("onSettledOnEndTarget " + endTarget);
|
||||
@@ -1598,7 +1599,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
mActivityInterface.onTransitionCancelled(wasVisible, mGestureState.getEndTarget());
|
||||
|
||||
if (mRecentsAnimationTargets != null) {
|
||||
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, true);
|
||||
}
|
||||
|
||||
// Leave the pending invisible flag, as it may be used by wallpaper open animation.
|
||||
@@ -1841,7 +1842,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
||||
@Override
|
||||
public void onRecentsAnimationFinished(RecentsAnimationController controller) {
|
||||
if (!controller.getFinishTargetIsLauncher()) {
|
||||
TaskViewUtils.setDividerBarShown(mRecentsAnimationTargets.nonApps, true);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(mRecentsAnimationTargets.nonApps, true);
|
||||
}
|
||||
mRecentsAnimationController = null;
|
||||
mRecentsAnimationTargets = null;
|
||||
|
||||
@@ -35,7 +35,6 @@ import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLAT
|
||||
import static com.android.launcher3.anim.Interpolators.clampToProgress;
|
||||
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
|
||||
import static com.android.launcher3.statehandlers.DepthController.DEPTH;
|
||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
|
||||
import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
|
||||
|
||||
@@ -505,7 +504,7 @@ public final class TaskViewUtils {
|
||||
nonAppTargets, depthController, pa);
|
||||
if (launcherClosing) {
|
||||
// TODO(b/182592057): differentiate between "restore split" vs "launch fullscreen app"
|
||||
TaskViewUtils.setDividerBarShown(nonAppTargets, true);
|
||||
TaskViewUtils.setSplitAuxiliarySurfacesShown(nonAppTargets, true);
|
||||
}
|
||||
|
||||
Animator childStateAnimation = null;
|
||||
@@ -560,18 +559,20 @@ public final class TaskViewUtils {
|
||||
anim.addListener(windowAnimEndListener);
|
||||
}
|
||||
|
||||
static void setDividerBarShown(RemoteAnimationTargetCompat[] nonApps, boolean shown) {
|
||||
static void setSplitAuxiliarySurfacesShown(RemoteAnimationTargetCompat[] nonApps,
|
||||
boolean shown) {
|
||||
// TODO(b/182592057): make this part of the animations instead.
|
||||
if (nonApps != null && nonApps.length > 0) {
|
||||
SurfaceControl.Transaction t = new SurfaceControl.Transaction();
|
||||
for (int i = 0; i < nonApps.length; ++i) {
|
||||
final RemoteAnimationTargetCompat targ = nonApps[i];
|
||||
if (targ.windowType == TYPE_DOCK_DIVIDER) {
|
||||
SurfaceControl.Transaction t = new SurfaceControl.Transaction();
|
||||
t.setVisibility(targ.leash.getSurfaceControl(), shown);
|
||||
t.apply();
|
||||
t.close();
|
||||
final SurfaceControl leash = targ.leash.getSurfaceControl();
|
||||
if (targ.windowType == TYPE_DOCK_DIVIDER && leash != null) {
|
||||
t.setVisibility(leash, shown);
|
||||
}
|
||||
}
|
||||
t.apply();
|
||||
t.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user