Loading services/core/java/com/android/server/wm/ActivityRecord.java +10 −2 Original line number Diff line number Diff line Loading @@ -2462,9 +2462,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (!newTask && taskSwitch && processRunning && !activityCreated && task.intent != null && mActivityComponent.equals(task.intent.getComponent())) { final ActivityRecord topAttached = task.getActivity(ActivityRecord::attachedToProcess); if (topAttached != null && topAttached.isSnapshotCompatible(snapshot)) { if (topAttached != null) { if (topAttached.isSnapshotCompatible(snapshot) // This trampoline must be the same rotation. && mDisplayContent.getDisplayRotation().rotationForOrientation(mOrientation, mDisplayContent.getRotation()) == snapshot.getRotation()) { return STARTING_WINDOW_TYPE_SNAPSHOT; } // No usable snapshot. And a splash screen may also be weird because an existing // activity may be shown right after the trampoline is finished. return STARTING_WINDOW_TYPE_NONE; } } final boolean isActivityHome = isActivityTypeHome(); if ((newTask || !processRunning || (taskSwitch && !activityCreated)) Loading services/core/java/com/android/server/wm/StartingSurfaceController.java +2 −3 Original line number Diff line number Diff line Loading @@ -158,14 +158,13 @@ public class StartingSurfaceController { + topFullscreenActivity); return null; } if (topFullscreenActivity.getWindowConfiguration().getRotation() != taskSnapshot.getRotation()) { if (activity.mDisplayContent.getRotation() != taskSnapshot.getRotation()) { // The snapshot should have been checked by ActivityRecord#isSnapshotCompatible // that the activity will be updated to the same rotation as the snapshot. Since // the transition is not started yet, fixed rotation transform needs to be applied // earlier to make the snapshot show in a rotated container. activity.mDisplayContent.handleTopActivityLaunchingInDifferentOrientation( topFullscreenActivity, false /* checkOpening */); activity, false /* checkOpening */); } mService.mAtmService.mTaskOrganizerController.addStartingWindow(task, activity, 0 /* launchTheme */, taskSnapshot); Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +10 −2 Original line number Diff line number Diff line Loading @@ -2462,9 +2462,17 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (!newTask && taskSwitch && processRunning && !activityCreated && task.intent != null && mActivityComponent.equals(task.intent.getComponent())) { final ActivityRecord topAttached = task.getActivity(ActivityRecord::attachedToProcess); if (topAttached != null && topAttached.isSnapshotCompatible(snapshot)) { if (topAttached != null) { if (topAttached.isSnapshotCompatible(snapshot) // This trampoline must be the same rotation. && mDisplayContent.getDisplayRotation().rotationForOrientation(mOrientation, mDisplayContent.getRotation()) == snapshot.getRotation()) { return STARTING_WINDOW_TYPE_SNAPSHOT; } // No usable snapshot. And a splash screen may also be weird because an existing // activity may be shown right after the trampoline is finished. return STARTING_WINDOW_TYPE_NONE; } } final boolean isActivityHome = isActivityTypeHome(); if ((newTask || !processRunning || (taskSwitch && !activityCreated)) Loading
services/core/java/com/android/server/wm/StartingSurfaceController.java +2 −3 Original line number Diff line number Diff line Loading @@ -158,14 +158,13 @@ public class StartingSurfaceController { + topFullscreenActivity); return null; } if (topFullscreenActivity.getWindowConfiguration().getRotation() != taskSnapshot.getRotation()) { if (activity.mDisplayContent.getRotation() != taskSnapshot.getRotation()) { // The snapshot should have been checked by ActivityRecord#isSnapshotCompatible // that the activity will be updated to the same rotation as the snapshot. Since // the transition is not started yet, fixed rotation transform needs to be applied // earlier to make the snapshot show in a rotated container. activity.mDisplayContent.handleTopActivityLaunchingInDifferentOrientation( topFullscreenActivity, false /* checkOpening */); activity, false /* checkOpening */); } mService.mAtmService.mTaskOrganizerController.addStartingWindow(task, activity, 0 /* launchTheme */, taskSnapshot); Loading