Merge "Request legacy app transition when moveActivityToFront" into tm-qpr-dev
This commit is contained in:
@@ -55,7 +55,9 @@ import static android.content.pm.ActivityInfo.launchModeToString;
|
||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static android.os.Process.INVALID_UID;
|
||||
import static android.view.Display.DEFAULT_DISPLAY;
|
||||
import static android.view.WindowManager.TRANSIT_NONE;
|
||||
import static android.view.WindowManager.TRANSIT_OPEN;
|
||||
import static android.view.WindowManager.TRANSIT_TO_FRONT;
|
||||
import static android.window.WindowContainerTransaction.HierarchyOp.HIERARCHY_OP_TYPE_START_ACTIVITY_IN_TASK_FRAGMENT;
|
||||
|
||||
import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_CONFIGURATION;
|
||||
@@ -2398,6 +2400,11 @@ class ActivityStarter {
|
||||
if (actuallyMoved) {
|
||||
// Only record if the activity actually moved.
|
||||
mMovedToTopActivity = act;
|
||||
if (mNoAnimation) {
|
||||
act.mDisplayContent.prepareAppTransition(TRANSIT_NONE);
|
||||
} else {
|
||||
act.mDisplayContent.prepareAppTransition(TRANSIT_TO_FRONT);
|
||||
}
|
||||
}
|
||||
act.updateOptionsLocked(mOptions);
|
||||
deliverNewIntent(act, intentGrants);
|
||||
|
||||
@@ -2605,6 +2605,14 @@ class TaskFragment extends WindowContainer<WindowContainer> {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean canCustomizeAppTransition() {
|
||||
// This is only called when the app transition is going to be played by system server. In
|
||||
// this case, we should allow custom app transition for fullscreen embedded TaskFragment
|
||||
// just like Activity.
|
||||
return isEmbedded() && matchParentBounds();
|
||||
}
|
||||
|
||||
/** Clear {@link #mLastPausedActivity} for all {@link TaskFragment} children */
|
||||
void clearLastPausedActivity() {
|
||||
forAllTaskFragments(taskFragment -> taskFragment.mLastPausedActivity = null);
|
||||
|
||||
Reference in New Issue
Block a user