Merge "Don't hide the home handle when it is attaching to the app" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
204388f153
@@ -185,6 +185,8 @@ class AsyncRotationController extends FadeAnimationController implements Consume
|
||||
}
|
||||
} else if (navigationBarCanMove || mTransitionOp == OP_CHANGE_MAY_SEAMLESS) {
|
||||
action = Operation.ACTION_SEAMLESS;
|
||||
} else if (mDisplayContent.mTransitionController.mNavigationBarAttachedToApp) {
|
||||
return;
|
||||
}
|
||||
mTargetWindowTokens.put(w.mToken, new Operation(action));
|
||||
return;
|
||||
|
||||
@@ -234,9 +234,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
private @TransitionState int mState = STATE_PENDING;
|
||||
private final ReadyTracker mReadyTracker = new ReadyTracker();
|
||||
|
||||
// TODO(b/188595497): remove when not needed.
|
||||
/** @see RecentsAnimationController#mNavigationBarAttachedToApp */
|
||||
private boolean mNavBarAttachedToApp = false;
|
||||
private int mRecentsDisplayId = INVALID_DISPLAY;
|
||||
|
||||
/** The delay for light bar appearance animation. */
|
||||
@@ -1781,7 +1778,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
if (navWindow == null || navWindow.mToken == null) {
|
||||
return;
|
||||
}
|
||||
mNavBarAttachedToApp = true;
|
||||
mController.mNavigationBarAttachedToApp = true;
|
||||
navWindow.mToken.cancelAnimation();
|
||||
final SurfaceControl.Transaction t = navWindow.mToken.getPendingTransaction();
|
||||
final SurfaceControl navSurfaceControl = navWindow.mToken.getSurfaceControl();
|
||||
@@ -1803,8 +1800,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
|
||||
/** @see RecentsAnimationController#restoreNavigationBarFromApp */
|
||||
void legacyRestoreNavigationBarFromApp() {
|
||||
if (!mNavBarAttachedToApp) return;
|
||||
mNavBarAttachedToApp = false;
|
||||
if (!mController.mNavigationBarAttachedToApp) {
|
||||
return;
|
||||
}
|
||||
mController.mNavigationBarAttachedToApp = false;
|
||||
|
||||
if (mRecentsDisplayId == INVALID_DISPLAY) {
|
||||
Slog.e(TAG, "Reparented navigation bar without a valid display");
|
||||
@@ -1837,6 +1836,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
break;
|
||||
}
|
||||
|
||||
final AsyncRotationController asyncRotationController = dc.getAsyncRotationController();
|
||||
if (asyncRotationController != null) {
|
||||
asyncRotationController.accept(navWindow);
|
||||
}
|
||||
|
||||
if (animate) {
|
||||
final NavBarFadeAnimationController controller =
|
||||
new NavBarFadeAnimationController(dc);
|
||||
@@ -1845,6 +1849,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
||||
// Reparent the SurfaceControl of nav bar token back.
|
||||
t.reparent(navToken.getSurfaceControl(), parent.getSurfaceControl());
|
||||
}
|
||||
|
||||
// To apply transactions.
|
||||
dc.mWmService.scheduleAnimationLocked();
|
||||
}
|
||||
|
||||
private void reportStartReasonsToLogger() {
|
||||
|
||||
@@ -206,6 +206,11 @@ class TransitionController {
|
||||
*/
|
||||
boolean mBuildingFinishLayers = false;
|
||||
|
||||
/**
|
||||
* Whether the surface of navigation bar token is reparented to an app.
|
||||
*/
|
||||
boolean mNavigationBarAttachedToApp = false;
|
||||
|
||||
private boolean mAnimatingState = false;
|
||||
|
||||
final Handler mLoggerHandler = FgThread.getHandler();
|
||||
|
||||
Reference in New Issue
Block a user