Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -570,20 +570,22 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin relayout(mRelayoutParams, startT, finishT, wct, oldRootView, mResult); relayout(mRelayoutParams, startT, finishT, wct, oldRootView, mResult); // After this line, mTaskInfo is up-to-date and should be used instead of taskInfo // After this line, mTaskInfo is up-to-date and should be used instead of taskInfo if (!wct.isEmpty()) { if (DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue() if (DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue() && mRelayoutParams.mShouldSetAppBounds) { && mRelayoutParams.mShouldSetAppBounds) { // When expanding from PiP to freeform, we need to start a Transition for applying the // When expanding from PiP to freeform, we need to start a Transition for applying // inset changes so that PiP receives the insets for the final bounds. This is because // the inset changes so that PiP receives the insets for the final bounds. This is // |mShouldSetAppBounds| applies the insets by modifying app bounds, which can cause a // because |mShouldSetAppBounds| applies the insets by modifying app bounds, which // bounds offset that needs to be reported to transition handlers. // can cause a bounds offset that needs to be reported to transition handlers. Trace.beginSection("DesktopModeWindowDecoration#relayout-startTransition"); Trace.beginSection("DesktopModeWindowDecoration#relayout-startTransition"); mHandler.post( mHandler.post(() -> mTransitions.startTransition(TRANSIT_CHANGE, wct, () -> mTransitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)); /* handler= */ null)); } else { } else { Trace.beginSection("DesktopModeWindowDecoration#relayout-applyWCT"); Trace.beginSection("DesktopModeWindowDecoration#relayout-applyWCT"); mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct)); mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct)); } } Trace.endSection(); Trace.endSection(); } if (mResult.mRootView == null) { if (mResult.mRootView == null) { // This means something blocks the window decor from showing, e.g. the task is hidden. // This means something blocks the window decor from showing, e.g. the task is hidden. Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +15 −13 Original line number Original line Diff line number Diff line Loading @@ -570,20 +570,22 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin relayout(mRelayoutParams, startT, finishT, wct, oldRootView, mResult); relayout(mRelayoutParams, startT, finishT, wct, oldRootView, mResult); // After this line, mTaskInfo is up-to-date and should be used instead of taskInfo // After this line, mTaskInfo is up-to-date and should be used instead of taskInfo if (!wct.isEmpty()) { if (DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue() if (DesktopExperienceFlags.ENABLE_DESKTOP_WINDOWING_PIP.isTrue() && mRelayoutParams.mShouldSetAppBounds) { && mRelayoutParams.mShouldSetAppBounds) { // When expanding from PiP to freeform, we need to start a Transition for applying the // When expanding from PiP to freeform, we need to start a Transition for applying // inset changes so that PiP receives the insets for the final bounds. This is because // the inset changes so that PiP receives the insets for the final bounds. This is // |mShouldSetAppBounds| applies the insets by modifying app bounds, which can cause a // because |mShouldSetAppBounds| applies the insets by modifying app bounds, which // bounds offset that needs to be reported to transition handlers. // can cause a bounds offset that needs to be reported to transition handlers. Trace.beginSection("DesktopModeWindowDecoration#relayout-startTransition"); Trace.beginSection("DesktopModeWindowDecoration#relayout-startTransition"); mHandler.post( mHandler.post(() -> mTransitions.startTransition(TRANSIT_CHANGE, wct, () -> mTransitions.startTransition(TRANSIT_CHANGE, wct, /* handler= */ null)); /* handler= */ null)); } else { } else { Trace.beginSection("DesktopModeWindowDecoration#relayout-applyWCT"); Trace.beginSection("DesktopModeWindowDecoration#relayout-applyWCT"); mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct)); mBgExecutor.execute(() -> mTaskOrganizer.applyTransaction(wct)); } } Trace.endSection(); Trace.endSection(); } if (mResult.mRootView == null) { if (mResult.mRootView == null) { // This means something blocks the window decor from showing, e.g. the task is hidden. // This means something blocks the window decor from showing, e.g. the task is hidden. Loading