Skip to content
Snippets Groups Projects
Commit 918378f0 authored by Marzia Favaro's avatar Marzia Favaro Committed by Android (Google) Code Review
Browse files

Merge "Synchronize finish callback for dim animations" into main

parents 73eb07f9 3640da9c
No related branches found
No related tags found
No related merge requests found
......@@ -171,12 +171,14 @@ public class DimmerAnimationHelper {
mLocalAnimationAdapter.startAnimation(dim.mDimSurface, t,
ANIMATION_TYPE_DIMMER, /* finishCallback */ (type, animator) -> {
setAlphaBlur(dim.mDimSurface, targetAlpha, targetBlur, t);
if (targetAlpha == 0f && !dim.isDimming()) {
dim.remove(t);
synchronized (dim.mHostContainer.mWmService.mGlobalLock) {
setAlphaBlur(dim.mDimSurface, targetAlpha, targetBlur, t);
if (targetAlpha == 0f && !dim.isDimming()) {
dim.remove(t);
}
mLocalAnimationAdapter = null;
mAlphaAnimationSpec = null;
}
mLocalAnimationAdapter = null;
mAlphaAnimationSpec = null;
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment