Loading data/etc/services.core.protolog.json +0 −6 Original line number Diff line number Diff line Loading @@ -3193,12 +3193,6 @@ "group": "WM_DEBUG_LOCKTASK", "at": "com\/android\/server\/wm\/LockTaskController.java" }, "956467125": { "message": "Reparenting Activity to embedded TaskFragment, but the Activity is not collected", "level": "WARN", "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/WindowOrganizerController.java" }, "958338552": { "message": "grantEmbeddedWindowFocus win=%s dropped focus so setting focus to null since no candidate was found", "level": "VERBOSE", Loading services/core/java/com/android/server/wm/ActivityStarter.java +1 −4 Original line number Diff line number Diff line Loading @@ -3018,10 +3018,7 @@ class ActivityStarter { newParent = candidateTf; } } if (newParent.canHaveEmbeddingActivityTransition(mStartActivity)) { // Make sure the embedded TaskFragment is included in the start activity transition. newParent.collectEmbeddedTaskFragmentIfNeeded(); } newParent.mTransitionController.collect(newParent); if (mStartActivity.getTaskFragment() == null || mStartActivity.getTaskFragment() == newParent) { newParent.addChild(mStartActivity, POSITION_TOP); Loading services/core/java/com/android/server/wm/TaskFragment.java +25 −28 Original line number Diff line number Diff line Loading @@ -2275,19 +2275,33 @@ class TaskFragment extends WindowContainer<WindowContainer> { super.onConfigurationChanged(newParentConfig); if (shouldStartChangeTransition(mTmpPrevBounds)) { final boolean shouldStartChangeTransition = shouldStartChangeTransition(mTmpPrevBounds); if (shouldStartChangeTransition) { initializeChangeTransition(mTmpPrevBounds); } else if (mTaskFragmentOrganizer != null) { } if (mTaskFragmentOrganizer != null) { if (mTransitionController.isShellTransitionsEnabled() && !mTransitionController.isCollecting(this)) { // TaskFragmentOrganizer doesn't have access to the surface for security reasons, so // update the surface here if it is not collected by Shell transition. updateOrganizedTaskFragmentSurface(); } else if (!mTransitionController.isShellTransitionsEnabled() && !shouldStartChangeTransition) { // Update the surface here instead of in the organizer so that we can make sure // it can be synced with the surface freezer. final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); // it can be synced with the surface freezer for legacy app transition. updateOrganizedTaskFragmentSurface(); } } sendTaskFragmentInfoChanged(); } private void updateOrganizedTaskFragmentSurface() { final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); } /** Updates the surface size so that the sub windows cannot be shown out of bounds. */ private void updateOrganizedTaskFragmentSurfaceSize(SurfaceControl.Transaction t, boolean forceUpdate) { Loading Loading @@ -2342,33 +2356,16 @@ class TaskFragment extends WindowContainer<WindowContainer> { || endBounds.height() != startBounds.height(); } boolean canHaveEmbeddingActivityTransition(@NonNull ActivityRecord child) { if (!isOrganizedTaskFragment() || !mTransitionController.isShellTransitionsEnabled()) { return false; } // The activity should request open transition when it is becoming visible. return child.isVisibleRequested(); } void collectEmbeddedTaskFragmentIfNeeded() { if (!isOrganizedTaskFragment() || mTransitionController.isCollecting(this)) { return; } if (getChildCount() == 0) { // The TaskFragment is new created, and just becoming non-empty. mTransitionController.collectExistenceChange(this); } else { mTransitionController.collect(this); } @Override boolean isSyncFinished() { return super.isSyncFinished() && isReadyToTransit(); } @Override void setSurfaceControl(SurfaceControl sc) { super.setSurfaceControl(sc); if (mTaskFragmentOrganizer != null) { final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); updateOrganizedTaskFragmentSurface(); // If the TaskFragmentOrganizer was set before we created the SurfaceControl, we need to // emit the callbacks now. sendTaskFragmentAppeared(); Loading services/core/java/com/android/server/wm/TransitionController.java +8 −0 Original line number Diff line number Diff line Loading @@ -226,6 +226,14 @@ class TransitionController { return mCollectingTransition != null; } /** * @return the collecting transition. {@code null} if there is no collecting transition. */ @Nullable Transition getCollectingTransition() { return mCollectingTransition; } /** * @return the collecting transition sync Id. This should only be called when there is a * collecting transition. Loading services/core/java/com/android/server/wm/WindowContainer.java +0 −1 Original line number Diff line number Diff line Loading @@ -2827,7 +2827,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< void initializeChangeTransition(Rect startBounds, @Nullable SurfaceControl freezeTarget) { if (mDisplayContent.mTransitionController.isShellTransitionsEnabled()) { mDisplayContent.mTransitionController.collectVisibleChange(this); // TODO(b/207070762): request shell transition for activityEmbedding change. return; } mDisplayContent.prepareAppTransition(TRANSIT_CHANGE); Loading Loading
data/etc/services.core.protolog.json +0 −6 Original line number Diff line number Diff line Loading @@ -3193,12 +3193,6 @@ "group": "WM_DEBUG_LOCKTASK", "at": "com\/android\/server\/wm\/LockTaskController.java" }, "956467125": { "message": "Reparenting Activity to embedded TaskFragment, but the Activity is not collected", "level": "WARN", "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/WindowOrganizerController.java" }, "958338552": { "message": "grantEmbeddedWindowFocus win=%s dropped focus so setting focus to null since no candidate was found", "level": "VERBOSE", Loading
services/core/java/com/android/server/wm/ActivityStarter.java +1 −4 Original line number Diff line number Diff line Loading @@ -3018,10 +3018,7 @@ class ActivityStarter { newParent = candidateTf; } } if (newParent.canHaveEmbeddingActivityTransition(mStartActivity)) { // Make sure the embedded TaskFragment is included in the start activity transition. newParent.collectEmbeddedTaskFragmentIfNeeded(); } newParent.mTransitionController.collect(newParent); if (mStartActivity.getTaskFragment() == null || mStartActivity.getTaskFragment() == newParent) { newParent.addChild(mStartActivity, POSITION_TOP); Loading
services/core/java/com/android/server/wm/TaskFragment.java +25 −28 Original line number Diff line number Diff line Loading @@ -2275,19 +2275,33 @@ class TaskFragment extends WindowContainer<WindowContainer> { super.onConfigurationChanged(newParentConfig); if (shouldStartChangeTransition(mTmpPrevBounds)) { final boolean shouldStartChangeTransition = shouldStartChangeTransition(mTmpPrevBounds); if (shouldStartChangeTransition) { initializeChangeTransition(mTmpPrevBounds); } else if (mTaskFragmentOrganizer != null) { } if (mTaskFragmentOrganizer != null) { if (mTransitionController.isShellTransitionsEnabled() && !mTransitionController.isCollecting(this)) { // TaskFragmentOrganizer doesn't have access to the surface for security reasons, so // update the surface here if it is not collected by Shell transition. updateOrganizedTaskFragmentSurface(); } else if (!mTransitionController.isShellTransitionsEnabled() && !shouldStartChangeTransition) { // Update the surface here instead of in the organizer so that we can make sure // it can be synced with the surface freezer. final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); // it can be synced with the surface freezer for legacy app transition. updateOrganizedTaskFragmentSurface(); } } sendTaskFragmentInfoChanged(); } private void updateOrganizedTaskFragmentSurface() { final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); } /** Updates the surface size so that the sub windows cannot be shown out of bounds. */ private void updateOrganizedTaskFragmentSurfaceSize(SurfaceControl.Transaction t, boolean forceUpdate) { Loading Loading @@ -2342,33 +2356,16 @@ class TaskFragment extends WindowContainer<WindowContainer> { || endBounds.height() != startBounds.height(); } boolean canHaveEmbeddingActivityTransition(@NonNull ActivityRecord child) { if (!isOrganizedTaskFragment() || !mTransitionController.isShellTransitionsEnabled()) { return false; } // The activity should request open transition when it is becoming visible. return child.isVisibleRequested(); } void collectEmbeddedTaskFragmentIfNeeded() { if (!isOrganizedTaskFragment() || mTransitionController.isCollecting(this)) { return; } if (getChildCount() == 0) { // The TaskFragment is new created, and just becoming non-empty. mTransitionController.collectExistenceChange(this); } else { mTransitionController.collect(this); } @Override boolean isSyncFinished() { return super.isSyncFinished() && isReadyToTransit(); } @Override void setSurfaceControl(SurfaceControl sc) { super.setSurfaceControl(sc); if (mTaskFragmentOrganizer != null) { final SurfaceControl.Transaction t = getSyncTransaction(); updateSurfacePosition(t); updateOrganizedTaskFragmentSurfaceSize(t, false /* forceUpdate */); updateOrganizedTaskFragmentSurface(); // If the TaskFragmentOrganizer was set before we created the SurfaceControl, we need to // emit the callbacks now. sendTaskFragmentAppeared(); Loading
services/core/java/com/android/server/wm/TransitionController.java +8 −0 Original line number Diff line number Diff line Loading @@ -226,6 +226,14 @@ class TransitionController { return mCollectingTransition != null; } /** * @return the collecting transition. {@code null} if there is no collecting transition. */ @Nullable Transition getCollectingTransition() { return mCollectingTransition; } /** * @return the collecting transition sync Id. This should only be called when there is a * collecting transition. Loading
services/core/java/com/android/server/wm/WindowContainer.java +0 −1 Original line number Diff line number Diff line Loading @@ -2827,7 +2827,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer< void initializeChangeTransition(Rect startBounds, @Nullable SurfaceControl freezeTarget) { if (mDisplayContent.mTransitionController.isShellTransitionsEnabled()) { mDisplayContent.mTransitionController.collectVisibleChange(this); // TODO(b/207070762): request shell transition for activityEmbedding change. return; } mDisplayContent.prepareAppTransition(TRANSIT_CHANGE); Loading