Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ class DisplayContent { final int delta = mService.dipToPixel(RESIZE_HANDLE_WIDTH_IN_DP, mDisplayMetrics); for (int i = windows.size() - 1; i >= 0; --i) { final WindowState win = windows.get(i); final Task task = win.mAppToken != null ? win.getTask() : null; final Task task = win.getTask(); if (win.isVisibleLw() && task != null) { /** * Exclusion region is the region that TapDetector doesn't care about. Loading services/core/java/com/android/server/wm/WindowState.java +5 −10 Original line number Diff line number Diff line Loading @@ -557,7 +557,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } mHaveFrame = true; final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); final boolean nonFullscreenTask = task != null && !task.isFullscreen(); final boolean freeformWorkspace = task != null && task.inFreeformWorkspace(); if (nonFullscreenTask) { Loading Loading @@ -916,12 +916,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } Task getTask() { AppWindowToken wtoken = mAppToken == null ? mService.mFocusedApp : mAppToken; if (wtoken == null) { return null; } final Task task = wtoken.mTask; return task; return mAppToken != null ? mAppToken.mTask : null; } TaskStack getStack() { Loading @@ -931,7 +926,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { return task.mStack; } } return mDisplayContent.getHomeStack(); return null; } /** Loading Loading @@ -1691,12 +1686,12 @@ final class WindowState implements WindowManagerPolicy.WindowState { } boolean inFreeformWorkspace() { final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); return task != null && task.inFreeformWorkspace(); } boolean isDragResizing() { final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); return mService.mTaskPositioner != null && mService.mTaskPositioner.isTaskResizing(task); } Loading services/core/java/com/android/server/wm/WindowSurfacePlacer.java +5 −2 Original line number Diff line number Diff line Loading @@ -625,8 +625,11 @@ class WindowSurfacePlacer { for (int i = windows.size() - 1; i >= 0; i--) { WindowState w = windows.get(i); final Task task = w.getTask(); if (task == null && w.getAttrs().type != TYPE_PRIVATE_PRESENTATION) { Task task = w.getTask(); if (task == null && w.getDisplayContent().getHomeStack() == null && w.getAttrs().type != TYPE_PRIVATE_PRESENTATION) { // TODO: Understand what the use case is here and see if the conditions can be // simplified. continue; } Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ class DisplayContent { final int delta = mService.dipToPixel(RESIZE_HANDLE_WIDTH_IN_DP, mDisplayMetrics); for (int i = windows.size() - 1; i >= 0; --i) { final WindowState win = windows.get(i); final Task task = win.mAppToken != null ? win.getTask() : null; final Task task = win.getTask(); if (win.isVisibleLw() && task != null) { /** * Exclusion region is the region that TapDetector doesn't care about. Loading
services/core/java/com/android/server/wm/WindowState.java +5 −10 Original line number Diff line number Diff line Loading @@ -557,7 +557,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } mHaveFrame = true; final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); final boolean nonFullscreenTask = task != null && !task.isFullscreen(); final boolean freeformWorkspace = task != null && task.inFreeformWorkspace(); if (nonFullscreenTask) { Loading Loading @@ -916,12 +916,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { } Task getTask() { AppWindowToken wtoken = mAppToken == null ? mService.mFocusedApp : mAppToken; if (wtoken == null) { return null; } final Task task = wtoken.mTask; return task; return mAppToken != null ? mAppToken.mTask : null; } TaskStack getStack() { Loading @@ -931,7 +926,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { return task.mStack; } } return mDisplayContent.getHomeStack(); return null; } /** Loading Loading @@ -1691,12 +1686,12 @@ final class WindowState implements WindowManagerPolicy.WindowState { } boolean inFreeformWorkspace() { final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); return task != null && task.inFreeformWorkspace(); } boolean isDragResizing() { final Task task = mAppToken != null ? getTask() : null; final Task task = getTask(); return mService.mTaskPositioner != null && mService.mTaskPositioner.isTaskResizing(task); } Loading
services/core/java/com/android/server/wm/WindowSurfacePlacer.java +5 −2 Original line number Diff line number Diff line Loading @@ -625,8 +625,11 @@ class WindowSurfacePlacer { for (int i = windows.size() - 1; i >= 0; i--) { WindowState w = windows.get(i); final Task task = w.getTask(); if (task == null && w.getAttrs().type != TYPE_PRIVATE_PRESENTATION) { Task task = w.getTask(); if (task == null && w.getDisplayContent().getHomeStack() == null && w.getAttrs().type != TYPE_PRIVATE_PRESENTATION) { // TODO: Understand what the use case is here and see if the conditions can be // simplified. continue; } Loading