Consolidate the starting window leash relative position.
There would also need to create a animation leash when transfer splash screen window, consolidate the shift position together so there won't flickering after reparent. Bug: 223924102 Test: Launch transfer splash screen app in landscape mode, verify no flicker. Change-Id: Iab1cd7d21e87a99d14c46204483d2a1087527125
This commit is contained in:
@@ -31,6 +31,7 @@ import android.app.ActivityManager.RunningTaskInfo;
|
||||
import android.app.WindowConfiguration;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ParceledListSlice;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
@@ -467,10 +468,12 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
static SurfaceControl applyStartingWindowAnimation(WindowContainer window) {
|
||||
static SurfaceControl applyStartingWindowAnimation(WindowState window) {
|
||||
final SurfaceControl.Transaction t = window.getPendingTransaction();
|
||||
final Rect mainFrame = window.getRelativeFrame();
|
||||
final StartingWindowAnimationAdaptor adaptor = new StartingWindowAnimationAdaptor();
|
||||
window.startAnimation(window.getPendingTransaction(), adaptor, false,
|
||||
ANIMATION_TYPE_STARTING_REVEAL);
|
||||
window.startAnimation(t, adaptor, false, ANIMATION_TYPE_STARTING_REVEAL);
|
||||
t.setPosition(adaptor.mAnimationLeash, mainFrame.left, mainFrame.top);
|
||||
return adaptor.mAnimationLeash;
|
||||
}
|
||||
|
||||
@@ -523,8 +526,6 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
|
||||
final SurfaceControl.Transaction t = mainWindow.getPendingTransaction();
|
||||
removalInfo.windowAnimationLeash = applyStartingWindowAnimation(mainWindow);
|
||||
removalInfo.mainFrame = mainWindow.getRelativeFrame();
|
||||
t.setPosition(removalInfo.windowAnimationLeash,
|
||||
removalInfo.mainFrame.left, removalInfo.mainFrame.top);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user