Loading services/core/java/com/android/server/wm/TaskPositioner.java +5 −0 Original line number Diff line number Diff line Loading @@ -450,6 +450,11 @@ class TaskPositioner implements IBinder.DeathRecipient { // This is a moving or scrolling operation. mTask.mStack.getDimBounds(mTmpRect); // If a target window is covered by system bar, there is no way to move it again by touch. // So we exclude them from stack bounds. and then it will be shown inside stable area. Rect stableBounds = new Rect(); mDisplayContent.getStableRect(stableBounds); mTmpRect.intersect(stableBounds); int nX = (int) x; int nY = (int) y; Loading services/core/java/com/android/server/wm/TaskRecord.java +19 −1 Original line number Diff line number Diff line Loading @@ -2209,9 +2209,27 @@ class TaskRecord extends ConfigurationContainer { // by policy, make sure the window remains within parent somewhere final float density = ((float) newParentConfig.densityDpi) / DisplayMetrics.DENSITY_DEFAULT; fitWithinBounds(outOverrideBounds, newParentConfig.windowConfiguration.getBounds(), final Rect parentBounds = new Rect(newParentConfig.windowConfiguration.getBounds()); final ActivityDisplay display = mStack.getDisplay(); if (display != null && display.mDisplayContent != null) { // If a freeform window moves below system bar, there is no way to move it again // by touch. Because its caption is covered by system bar. So we exclude them // from stack bounds. and then caption will be shown inside stable area. final Rect stableBounds = new Rect(); display.mDisplayContent.getStableRect(stableBounds); parentBounds.intersect(stableBounds); } fitWithinBounds(outOverrideBounds, parentBounds, (int) (density * WindowState.MINIMUM_VISIBLE_WIDTH_IN_DP), (int) (density * WindowState.MINIMUM_VISIBLE_HEIGHT_IN_DP)); // Prevent to overlap caption with stable insets. final int offsetTop = parentBounds.top - outOverrideBounds.top; if (offsetTop > 0) { outOverrideBounds.offset(0, offsetTop); } } computeConfigResourceOverrides(getResolvedOverrideConfiguration(), newParentConfig); } Loading Loading
services/core/java/com/android/server/wm/TaskPositioner.java +5 −0 Original line number Diff line number Diff line Loading @@ -450,6 +450,11 @@ class TaskPositioner implements IBinder.DeathRecipient { // This is a moving or scrolling operation. mTask.mStack.getDimBounds(mTmpRect); // If a target window is covered by system bar, there is no way to move it again by touch. // So we exclude them from stack bounds. and then it will be shown inside stable area. Rect stableBounds = new Rect(); mDisplayContent.getStableRect(stableBounds); mTmpRect.intersect(stableBounds); int nX = (int) x; int nY = (int) y; Loading
services/core/java/com/android/server/wm/TaskRecord.java +19 −1 Original line number Diff line number Diff line Loading @@ -2209,9 +2209,27 @@ class TaskRecord extends ConfigurationContainer { // by policy, make sure the window remains within parent somewhere final float density = ((float) newParentConfig.densityDpi) / DisplayMetrics.DENSITY_DEFAULT; fitWithinBounds(outOverrideBounds, newParentConfig.windowConfiguration.getBounds(), final Rect parentBounds = new Rect(newParentConfig.windowConfiguration.getBounds()); final ActivityDisplay display = mStack.getDisplay(); if (display != null && display.mDisplayContent != null) { // If a freeform window moves below system bar, there is no way to move it again // by touch. Because its caption is covered by system bar. So we exclude them // from stack bounds. and then caption will be shown inside stable area. final Rect stableBounds = new Rect(); display.mDisplayContent.getStableRect(stableBounds); parentBounds.intersect(stableBounds); } fitWithinBounds(outOverrideBounds, parentBounds, (int) (density * WindowState.MINIMUM_VISIBLE_WIDTH_IN_DP), (int) (density * WindowState.MINIMUM_VISIBLE_HEIGHT_IN_DP)); // Prevent to overlap caption with stable insets. final int offsetTop = parentBounds.top - outOverrideBounds.top; if (offsetTop > 0) { outOverrideBounds.offset(0, offsetTop); } } computeConfigResourceOverrides(getResolvedOverrideConfiguration(), newParentConfig); } Loading