[Unfold animation] Merge change transitions into unfold transition
Currently if we unfold a foldable device, first the display switch happens and then after some time Launcher adds a taskbar, which leads to an extra configuration change (and a CHANGE transition). This causes a problem that unfold animation gets stuck for some time if this second CHANGE transition starts during unfold animation. This CL fixes it by merging this extra transition into the unfold transition. Bug: 278064943 Test: unfold several times on launcher, app => check that it looks correct Change-Id: Id0fa208210e275042a84a40f6e823652314a306c
This commit is contained in:
@@ -173,6 +173,17 @@ public class UnfoldTransitionHandler implements TransitionHandler, UnfoldListene
|
||||
mTransition = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mergeAnimation(@NonNull IBinder transition, @NonNull TransitionInfo info,
|
||||
@NonNull SurfaceControl.Transaction t, @NonNull IBinder mergeTarget,
|
||||
@NonNull TransitionFinishCallback finishCallback) {
|
||||
if (info.getType() == TRANSIT_CHANGE) {
|
||||
// Apply changes happening during the unfold animation immediately
|
||||
t.apply();
|
||||
finishCallback.onTransitionFinished(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public WindowContainerTransaction handleRequest(@NonNull IBinder transition,
|
||||
|
||||
Reference in New Issue
Block a user