Support multiple tasks in recentsaninmation onTaskAppeared
Needed for app-pairs support Bug: 204094785 Test: TODO Change-Id: I3c5f8097b04b4033ba887e3c6d9e5ffd900df80e
This commit is contained in:
@@ -56,6 +56,7 @@ public class SplitSelectStateController {
|
||||
private Task mInitialTask;
|
||||
private Task mSecondTask;
|
||||
private Rect mInitialBounds;
|
||||
private boolean mRecentsAnimationRunning;
|
||||
|
||||
public SplitSelectStateController(Handler handler, SystemUiProxy systemUiProxy) {
|
||||
mHandler = handler;
|
||||
@@ -113,6 +114,10 @@ public class SplitSelectStateController {
|
||||
return mStagePosition;
|
||||
}
|
||||
|
||||
public void setRecentsAnimationRunning(boolean running) {
|
||||
this.mRecentsAnimationRunning = running;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requires Shell Transitions
|
||||
*/
|
||||
@@ -172,7 +177,9 @@ public class SplitSelectStateController {
|
||||
public void onAnimationCancelled() {
|
||||
postAsyncCallback(mHandler, () -> {
|
||||
if (mSuccessCallback != null) {
|
||||
mSuccessCallback.accept(false);
|
||||
// Launching legacy tasks while recents animation is running will always cause
|
||||
// onAnimationCancelled to be called (should be fixed w/ shell transitions?)
|
||||
mSuccessCallback.accept(mRecentsAnimationRunning);
|
||||
}
|
||||
resetState();
|
||||
});
|
||||
@@ -187,6 +194,7 @@ public class SplitSelectStateController {
|
||||
mSecondTask = null;
|
||||
mStagePosition = SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;
|
||||
mInitialBounds = null;
|
||||
mRecentsAnimationRunning = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user