Merge "No input for windows in minimized docked stack" into nyc-dev

This commit is contained in:
Jorim Jaggi
2016-04-13 02:31:47 +00:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 3 deletions

View File

@@ -290,7 +290,7 @@ class DisplayContent {
for (int stackNdx = mStacks.size() - 1; stackNdx >= 0; --stackNdx) {
TaskStack stack = mStacks.get(stackNdx);
stack.getBounds(mTmpRect);
if (!mTmpRect.contains(x, y)) {
if (!mTmpRect.contains(x, y) || stack.isAdjustedForMinimizedDockedStack()) {
continue;
}
final ArrayList<Task> tasks = stack.getTasks();

View File

@@ -294,7 +294,8 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
final WindowState child = windows.get(winNdx);
final InputChannel inputChannel = child.mInputChannel;
final InputWindowHandle inputWindowHandle = child.mInputWindowHandle;
if (inputChannel == null || inputWindowHandle == null || child.mRemoved) {
if (inputChannel == null || inputWindowHandle == null || child.mRemoved
|| child.isAdjustedForMinimizedDock()) {
// Skip this window because it cannot possibly receive input.
continue;
}

View File

@@ -1390,6 +1390,11 @@ final class WindowState implements WindowManagerPolicy.WindowState {
return configChanged;
}
boolean isAdjustedForMinimizedDock() {
return mAppToken != null && mAppToken.mTask != null
&& mAppToken.mTask.mStack.isAdjustedForMinimizedDock();
}
void removeLocked() {
disposeInputChannel();
@@ -1776,7 +1781,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
return isVisibleOrAdding()
&& (mViewVisibility == View.VISIBLE)
&& ((mAttrs.flags & WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE) == 0)
&& (mAppToken == null || mAppToken.windowsAreFocusable());
&& (mAppToken == null || mAppToken.windowsAreFocusable())
&& !isAdjustedForMinimizedDock();
}
@Override