Update running remote animation state after activity change

To ensure that we don't demote the process priority in the
meantime

This should fix about 3% jank on APP_CLOSE_TO_HOME

Test: Inspect trace
Bug: 225245518
Change-Id: Ie21a143bd959aa4f2b0ab75a8c2ab3f9ab08357a
This commit is contained in:
Jorim Jaggi
2022-03-24 01:31:53 +01:00
parent cc37f4e979
commit 5946435248

View File

@@ -304,10 +304,6 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
mService.stopAppSwitches();
}
if (mCaller != null) {
mCaller.setRunningRecentsAnimation(false);
}
mWindowManager.inSurfaceTransaction(() -> {
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER,
"RecentsAnimation#onAnimationFinished_inSurfaceTransaction");
@@ -413,6 +409,9 @@ class RecentsAnimation implements RecentsAnimationCallbacks, OnRootTaskOrderChan
if (mWindowManager.mRoot.isLayoutNeeded()) {
mWindowManager.mRoot.performSurfacePlacement();
}
if (mCaller != null) {
mCaller.setRunningRecentsAnimation(false);
}
Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
}
});