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) {
|
} else if (navigationBarCanMove || mTransitionOp == OP_CHANGE_MAY_SEAMLESS) {
|
||||||
action = Operation.ACTION_SEAMLESS;
|
action = Operation.ACTION_SEAMLESS;
|
||||||
|
} else if (mDisplayContent.mTransitionController.mNavigationBarAttachedToApp) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
mTargetWindowTokens.put(w.mToken, new Operation(action));
|
mTargetWindowTokens.put(w.mToken, new Operation(action));
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -234,9 +234,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
private @TransitionState int mState = STATE_PENDING;
|
private @TransitionState int mState = STATE_PENDING;
|
||||||
private final ReadyTracker mReadyTracker = new ReadyTracker();
|
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;
|
private int mRecentsDisplayId = INVALID_DISPLAY;
|
||||||
|
|
||||||
/** The delay for light bar appearance animation. */
|
/** The delay for light bar appearance animation. */
|
||||||
@@ -1781,7 +1778,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
if (navWindow == null || navWindow.mToken == null) {
|
if (navWindow == null || navWindow.mToken == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mNavBarAttachedToApp = true;
|
mController.mNavigationBarAttachedToApp = true;
|
||||||
navWindow.mToken.cancelAnimation();
|
navWindow.mToken.cancelAnimation();
|
||||||
final SurfaceControl.Transaction t = navWindow.mToken.getPendingTransaction();
|
final SurfaceControl.Transaction t = navWindow.mToken.getPendingTransaction();
|
||||||
final SurfaceControl navSurfaceControl = navWindow.mToken.getSurfaceControl();
|
final SurfaceControl navSurfaceControl = navWindow.mToken.getSurfaceControl();
|
||||||
@@ -1803,8 +1800,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
|
|
||||||
/** @see RecentsAnimationController#restoreNavigationBarFromApp */
|
/** @see RecentsAnimationController#restoreNavigationBarFromApp */
|
||||||
void legacyRestoreNavigationBarFromApp() {
|
void legacyRestoreNavigationBarFromApp() {
|
||||||
if (!mNavBarAttachedToApp) return;
|
if (!mController.mNavigationBarAttachedToApp) {
|
||||||
mNavBarAttachedToApp = false;
|
return;
|
||||||
|
}
|
||||||
|
mController.mNavigationBarAttachedToApp = false;
|
||||||
|
|
||||||
if (mRecentsDisplayId == INVALID_DISPLAY) {
|
if (mRecentsDisplayId == INVALID_DISPLAY) {
|
||||||
Slog.e(TAG, "Reparented navigation bar without a valid display");
|
Slog.e(TAG, "Reparented navigation bar without a valid display");
|
||||||
@@ -1837,6 +1836,11 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final AsyncRotationController asyncRotationController = dc.getAsyncRotationController();
|
||||||
|
if (asyncRotationController != null) {
|
||||||
|
asyncRotationController.accept(navWindow);
|
||||||
|
}
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
final NavBarFadeAnimationController controller =
|
final NavBarFadeAnimationController controller =
|
||||||
new NavBarFadeAnimationController(dc);
|
new NavBarFadeAnimationController(dc);
|
||||||
@@ -1845,6 +1849,9 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
|
|||||||
// Reparent the SurfaceControl of nav bar token back.
|
// Reparent the SurfaceControl of nav bar token back.
|
||||||
t.reparent(navToken.getSurfaceControl(), parent.getSurfaceControl());
|
t.reparent(navToken.getSurfaceControl(), parent.getSurfaceControl());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// To apply transactions.
|
||||||
|
dc.mWmService.scheduleAnimationLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reportStartReasonsToLogger() {
|
private void reportStartReasonsToLogger() {
|
||||||
|
|||||||
@@ -206,6 +206,11 @@ class TransitionController {
|
|||||||
*/
|
*/
|
||||||
boolean mBuildingFinishLayers = false;
|
boolean mBuildingFinishLayers = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the surface of navigation bar token is reparented to an app.
|
||||||
|
*/
|
||||||
|
boolean mNavigationBarAttachedToApp = false;
|
||||||
|
|
||||||
private boolean mAnimatingState = false;
|
private boolean mAnimatingState = false;
|
||||||
|
|
||||||
final Handler mLoggerHandler = FgThread.getHandler();
|
final Handler mLoggerHandler = FgThread.getHandler();
|
||||||
|
|||||||
Reference in New Issue
Block a user