Loading services/core/java/com/android/server/wm/DisplayContent.java +2 −2 Original line number Diff line number Diff line Loading @@ -3209,7 +3209,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayout(true /*initial*/, updateInputWindows); } else if (mode == UPDATE_FOCUS_REMOVING_FOCUS) { mWmService.mRoot.performSurfacePlacement(false); mWmService.mRoot.performSurfacePlacement(); } } Loading Loading @@ -3846,7 +3846,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo } // TODO: Super crazy long method that should be broken down... void applySurfaceChangesTransaction(boolean recoveringMemory) { void applySurfaceChangesTransaction() { final WindowSurfacePlacer surfacePlacer = mWmService.mWindowPlacerLocked; mTmpUpdateAllDrawn.clear(); Loading services/core/java/com/android/server/wm/RecentsAnimation.java +6 −0 Original line number Diff line number Diff line Loading @@ -400,6 +400,12 @@ class RecentsAnimation implements RecentsAnimationCallbacks, throw e; } finally { mService.continueWindowLayout(); // Make sure the surfaces are updated with the latest state. Sometimes the // surface placement may be skipped if display configuration is changed (i.e. // {@link DisplayContent#mWaitingForConfig} is true). if (mWindowManager.mRoot.isLayoutNeeded()) { mWindowManager.mRoot.performSurfacePlacement(); } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } }); Loading services/core/java/com/android/server/wm/RootWindowContainer.java +6 −6 Original line number Diff line number Diff line Loading @@ -796,10 +796,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent> return leakedSurface || killedApps; } void performSurfacePlacement(boolean recoveringMemory) { void performSurfacePlacement() { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "performSurfacePlacement"); try { performSurfacePlacementNoTrace(recoveringMemory); performSurfacePlacementNoTrace(); } finally { Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading @@ -807,7 +807,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> // "Something has changed! Let's make it correct now." // TODO: Super crazy long method that should be broken down... void performSurfacePlacementNoTrace(boolean recoveringMemory) { void performSurfacePlacementNoTrace() { if (DEBUG_WINDOW_TRACE) Slog.v(TAG, "performSurfacePlacementInner: entry. Called by " + Debug.getCallers(3)); Loading Loading @@ -842,7 +842,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "applySurfaceChanges"); mWmService.openSurfaceTransaction(); try { applySurfaceChangesTransaction(recoveringMemory); applySurfaceChangesTransaction(); } catch (RuntimeException e) { Slog.wtf(TAG, "Unhandled exception in Window Manager", e); } finally { Loading Loading @@ -1042,7 +1042,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } private void applySurfaceChangesTransaction(boolean recoveringMemory) { private void applySurfaceChangesTransaction() { mHoldScreenWindow = null; mObscuringWindow = null; Loading @@ -1065,7 +1065,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final int count = mChildren.size(); for (int j = 0; j < count; ++j) { final DisplayContent dc = mChildren.get(j); dc.applySurfaceChangesTransaction(recoveringMemory); dc.applySurfaceChangesTransaction(); } // Give the display manager a chance to adjust properties like display rotation if it needs Loading services/core/java/com/android/server/wm/WindowSurfacePlacer.java +1 −3 Original line number Diff line number Diff line Loading @@ -157,9 +157,7 @@ class WindowSurfacePlacer { mInLayout = true; boolean recoveringMemory = false; if (!mService.mForceRemoves.isEmpty()) { recoveringMemory = true; // Wait a little bit for things to settle down, and off we go. while (!mService.mForceRemoves.isEmpty()) { final WindowState ws = mService.mForceRemoves.remove(0); Loading @@ -177,7 +175,7 @@ class WindowSurfacePlacer { } try { mService.mRoot.performSurfacePlacement(recoveringMemory); mService.mRoot.performSurfacePlacement(); mInLayout = false; Loading services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java +1 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE; import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; import static com.android.dx.mockito.inline.extended.ExtendedMockito.anyBoolean; import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing; import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; Loading @@ -38,7 +37,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; import android.platform.test.annotations.Presubmit; Loading Loading @@ -70,7 +68,7 @@ public class AppTransitionTests extends WindowTestsBase { @Before public void setUp() throws Exception { doNothing().when(mWm.mRoot).performSurfacePlacement(anyBoolean()); doNothing().when(mWm.mRoot).performSurfacePlacement(); mDc = mWm.getDefaultDisplayContentLocked(); } Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +2 −2 Original line number Diff line number Diff line Loading @@ -3209,7 +3209,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo if (mode == UPDATE_FOCUS_PLACING_SURFACES) { performLayout(true /*initial*/, updateInputWindows); } else if (mode == UPDATE_FOCUS_REMOVING_FOCUS) { mWmService.mRoot.performSurfacePlacement(false); mWmService.mRoot.performSurfacePlacement(); } } Loading Loading @@ -3846,7 +3846,7 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo } // TODO: Super crazy long method that should be broken down... void applySurfaceChangesTransaction(boolean recoveringMemory) { void applySurfaceChangesTransaction() { final WindowSurfacePlacer surfacePlacer = mWmService.mWindowPlacerLocked; mTmpUpdateAllDrawn.clear(); Loading
services/core/java/com/android/server/wm/RecentsAnimation.java +6 −0 Original line number Diff line number Diff line Loading @@ -400,6 +400,12 @@ class RecentsAnimation implements RecentsAnimationCallbacks, throw e; } finally { mService.continueWindowLayout(); // Make sure the surfaces are updated with the latest state. Sometimes the // surface placement may be skipped if display configuration is changed (i.e. // {@link DisplayContent#mWaitingForConfig} is true). if (mWindowManager.mRoot.isLayoutNeeded()) { mWindowManager.mRoot.performSurfacePlacement(); } Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } }); Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +6 −6 Original line number Diff line number Diff line Loading @@ -796,10 +796,10 @@ class RootWindowContainer extends WindowContainer<DisplayContent> return leakedSurface || killedApps; } void performSurfacePlacement(boolean recoveringMemory) { void performSurfacePlacement() { Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "performSurfacePlacement"); try { performSurfacePlacementNoTrace(recoveringMemory); performSurfacePlacementNoTrace(); } finally { Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER); } Loading @@ -807,7 +807,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> // "Something has changed! Let's make it correct now." // TODO: Super crazy long method that should be broken down... void performSurfacePlacementNoTrace(boolean recoveringMemory) { void performSurfacePlacementNoTrace() { if (DEBUG_WINDOW_TRACE) Slog.v(TAG, "performSurfacePlacementInner: entry. Called by " + Debug.getCallers(3)); Loading Loading @@ -842,7 +842,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "applySurfaceChanges"); mWmService.openSurfaceTransaction(); try { applySurfaceChangesTransaction(recoveringMemory); applySurfaceChangesTransaction(); } catch (RuntimeException e) { Slog.wtf(TAG, "Unhandled exception in Window Manager", e); } finally { Loading Loading @@ -1042,7 +1042,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } private void applySurfaceChangesTransaction(boolean recoveringMemory) { private void applySurfaceChangesTransaction() { mHoldScreenWindow = null; mObscuringWindow = null; Loading @@ -1065,7 +1065,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> final int count = mChildren.size(); for (int j = 0; j < count; ++j) { final DisplayContent dc = mChildren.get(j); dc.applySurfaceChangesTransaction(recoveringMemory); dc.applySurfaceChangesTransaction(); } // Give the display manager a chance to adjust properties like display rotation if it needs Loading
services/core/java/com/android/server/wm/WindowSurfacePlacer.java +1 −3 Original line number Diff line number Diff line Loading @@ -157,9 +157,7 @@ class WindowSurfacePlacer { mInLayout = true; boolean recoveringMemory = false; if (!mService.mForceRemoves.isEmpty()) { recoveringMemory = true; // Wait a little bit for things to settle down, and off we go. while (!mService.mForceRemoves.isEmpty()) { final WindowState ws = mService.mForceRemoves.remove(0); Loading @@ -177,7 +175,7 @@ class WindowSurfacePlacer { } try { mService.mRoot.performSurfacePlacement(recoveringMemory); mService.mRoot.performSurfacePlacement(); mInLayout = false; Loading
services/tests/wmtests/src/com/android/server/wm/AppTransitionTests.java +1 −3 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import static android.view.WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE; import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; import static com.android.dx.mockito.inline.extended.ExtendedMockito.anyBoolean; import static com.android.dx.mockito.inline.extended.ExtendedMockito.doNothing; import static com.android.dx.mockito.inline.extended.ExtendedMockito.doReturn; Loading @@ -38,7 +37,6 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.ArgumentMatchers.any; import android.graphics.Rect; import android.os.IBinder; import android.os.RemoteException; import android.platform.test.annotations.Presubmit; Loading Loading @@ -70,7 +68,7 @@ public class AppTransitionTests extends WindowTestsBase { @Before public void setUp() throws Exception { doNothing().when(mWm.mRoot).performSurfacePlacement(anyBoolean()); doNothing().when(mWm.mRoot).performSurfacePlacement(); mDc = mWm.getDefaultDisplayContentLocked(); } Loading