Loading services/core/java/com/android/server/wm/AppWindowToken.java +23 −17 Original line number Diff line number Diff line Loading @@ -891,8 +891,24 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return mPendingRelaunchCount > 0; } boolean shouldFreezeBounds() { final Task task = getTask(); // For freeform windows, we can't freeze the bounds at the moment because this would make // the resizing unresponsive. if (task == null || task.inFreeformWorkspace()) { return false; } // We freeze the bounds while drag resizing to deal with the time between // the divider/drag handle being released, and the handling it's new // configuration. If we are relaunched outside of the drag resizing state, // we need to be careful not to do this. return getTask().isDragResizing(); } void startRelaunching() { if (canFreezeBounds()) { if (shouldFreezeBounds()) { freezeBounds(); } Loading @@ -909,9 +925,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } void finishRelaunching() { if (canFreezeBounds()) { unfreezeBounds(); } if (mPendingRelaunchCount > 0) { mPendingRelaunchCount--; } else { Loading @@ -926,9 +941,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (mPendingRelaunchCount == 0) { return; } if (canFreezeBounds()) { unfreezeBounds(); } mPendingRelaunchCount = 0; } Loading Loading @@ -1032,14 +1045,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } } private boolean canFreezeBounds() { final Task task = getTask(); // For freeform windows, we can't freeze the bounds at the moment because this would make // the resizing unresponsive. return task != null && !task.inFreeformWorkspace(); } /** * Freezes the task bounds. The size of this task reported the app will be fixed to the bounds * freezed by {@link Task#prepareFreezingBounds} until {@link #unfreezeBounds} gets called, even Loading @@ -1064,9 +1069,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree * Unfreezes the previously frozen bounds. See {@link #freezeBounds}. */ private void unfreezeBounds() { if (!mFrozenBounds.isEmpty()) { mFrozenBounds.remove(); if (mFrozenBounds.isEmpty()) { return; } mFrozenBounds.remove(); if (!mFrozenMergedConfig.isEmpty()) { mFrozenMergedConfig.remove(); } Loading Loading
services/core/java/com/android/server/wm/AppWindowToken.java +23 −17 Original line number Diff line number Diff line Loading @@ -891,8 +891,24 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree return mPendingRelaunchCount > 0; } boolean shouldFreezeBounds() { final Task task = getTask(); // For freeform windows, we can't freeze the bounds at the moment because this would make // the resizing unresponsive. if (task == null || task.inFreeformWorkspace()) { return false; } // We freeze the bounds while drag resizing to deal with the time between // the divider/drag handle being released, and the handling it's new // configuration. If we are relaunched outside of the drag resizing state, // we need to be careful not to do this. return getTask().isDragResizing(); } void startRelaunching() { if (canFreezeBounds()) { if (shouldFreezeBounds()) { freezeBounds(); } Loading @@ -909,9 +925,8 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } void finishRelaunching() { if (canFreezeBounds()) { unfreezeBounds(); } if (mPendingRelaunchCount > 0) { mPendingRelaunchCount--; } else { Loading @@ -926,9 +941,7 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree if (mPendingRelaunchCount == 0) { return; } if (canFreezeBounds()) { unfreezeBounds(); } mPendingRelaunchCount = 0; } Loading Loading @@ -1032,14 +1045,6 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree } } private boolean canFreezeBounds() { final Task task = getTask(); // For freeform windows, we can't freeze the bounds at the moment because this would make // the resizing unresponsive. return task != null && !task.inFreeformWorkspace(); } /** * Freezes the task bounds. The size of this task reported the app will be fixed to the bounds * freezed by {@link Task#prepareFreezingBounds} until {@link #unfreezeBounds} gets called, even Loading @@ -1064,9 +1069,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree * Unfreezes the previously frozen bounds. See {@link #freezeBounds}. */ private void unfreezeBounds() { if (!mFrozenBounds.isEmpty()) { mFrozenBounds.remove(); if (mFrozenBounds.isEmpty()) { return; } mFrozenBounds.remove(); if (!mFrozenMergedConfig.isEmpty()) { mFrozenMergedConfig.remove(); } Loading