diff options
author | Craig Mautner <cmautner@google.com> | 2014-11-12 03:45:01 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-12 03:45:01 +0000 |
commit | ec36c2401d4471a819d6b32df3da7245fd7db7d8 (patch) | |
tree | 7db5d10e0ed0633eacbfd6688d15578659a29411 | |
parent | b31ac7e17fc8dd03fa52e7813cda4dde1302a6b2 (diff) | |
parent | b39f5510f4285f10e9071987eb2d484e0ff4a58b (diff) | |
download | frameworks_base-ec36c2401d4471a819d6b32df3da7245fd7db7d8.zip frameworks_base-ec36c2401d4471a819d6b32df3da7245fd7db7d8.tar.gz frameworks_base-ec36c2401d4471a819d6b32df3da7245fd7db7d8.tar.bz2 |
am b39f5510: Show error dialogs over apps that dismiss keyguard automerge: c08eab8 automerge: 2b9e9f4
* commit 'b39f5510f4285f10e9071987eb2d484e0ff4a58b':
Show error dialogs over apps that dismiss keyguard
7 files changed, 11 insertions, 21 deletions
diff --git a/services/core/java/com/android/server/input/InputWindowHandle.java b/services/core/java/com/android/server/input/InputWindowHandle.java index 9a70f38..9149fcc 100644 --- a/services/core/java/com/android/server/input/InputWindowHandle.java +++ b/services/core/java/com/android/server/input/InputWindowHandle.java @@ -44,7 +44,6 @@ public final class InputWindowHandle { // Window layout params attributes. (WindowManager.LayoutParams) public int layoutParamsFlags; - public int layoutParamsPrivateFlags; public int layoutParamsType; // Dispatching timeout. diff --git a/services/core/java/com/android/server/wm/DragState.java b/services/core/java/com/android/server/wm/DragState.java index edc7c93..c6951bd 100644 --- a/services/core/java/com/android/server/wm/DragState.java +++ b/services/core/java/com/android/server/wm/DragState.java @@ -114,7 +114,6 @@ class DragState { mDragWindowHandle.inputChannel = mServerChannel; mDragWindowHandle.layer = getDragLayerLw(); mDragWindowHandle.layoutParamsFlags = 0; - mDragWindowHandle.layoutParamsPrivateFlags = 0; mDragWindowHandle.layoutParamsType = WindowManager.LayoutParams.TYPE_DRAG; mDragWindowHandle.dispatchingTimeoutNanos = WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS; diff --git a/services/core/java/com/android/server/wm/FakeWindowImpl.java b/services/core/java/com/android/server/wm/FakeWindowImpl.java index c18ea01..1136ced 100644 --- a/services/core/java/com/android/server/wm/FakeWindowImpl.java +++ b/services/core/java/com/android/server/wm/FakeWindowImpl.java @@ -38,7 +38,7 @@ public final class FakeWindowImpl implements WindowManagerPolicy.FakeWindow { public FakeWindowImpl(WindowManagerService service, Looper looper, InputEventReceiver.Factory inputEventReceiverFactory, - String name, int windowType, int layoutParamsFlags, int layoutParamsPrivateFlags, + String name, int windowType, int layoutParamsFlags, boolean canReceiveKeys, boolean hasFocus, boolean touchFullscreen) { mService = service; @@ -61,7 +61,6 @@ public final class FakeWindowImpl implements WindowManagerPolicy.FakeWindow { mWindowLayer = getLayerLw(windowType); mWindowHandle.layer = mWindowLayer; mWindowHandle.layoutParamsFlags = layoutParamsFlags; - mWindowHandle.layoutParamsPrivateFlags = layoutParamsPrivateFlags; mWindowHandle.layoutParamsType = windowType; mWindowHandle.dispatchingTimeoutNanos = WindowManagerService.DEFAULT_INPUT_DISPATCHING_TIMEOUT_NANOS; diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 46aefb6..0327cb3 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -168,8 +168,8 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { } private void addInputWindowHandleLw(final InputWindowHandle inputWindowHandle, - final WindowState child, int flags, int privateFlags, final int type, - final boolean isVisible, final boolean hasFocus, final boolean hasWallpaper) { + final WindowState child, int flags, final int type, final boolean isVisible, + final boolean hasFocus, final boolean hasWallpaper) { // Add a window to our list of input windows. inputWindowHandle.name = child.toString(); final boolean modal = (flags & (WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL @@ -184,7 +184,6 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { child.getTouchableRegion(inputWindowHandle.touchableRegion); } inputWindowHandle.layoutParamsFlags = flags; - inputWindowHandle.layoutParamsPrivateFlags = privateFlags; inputWindowHandle.layoutParamsType = type; inputWindowHandle.dispatchingTimeoutNanos = child.getInputDispatchingTimeoutNanos(); inputWindowHandle.visible = isVisible; @@ -298,15 +297,14 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { final WindowState u = universeBackground.mWin; if (u.mInputChannel != null && u.mInputWindowHandle != null) { addInputWindowHandleLw(u.mInputWindowHandle, u, u.mAttrs.flags, - u.mAttrs.privateFlags, u.mAttrs.type, - true, u == mInputFocus, false); + u.mAttrs.type, true, u == mInputFocus, false); } addedUniverse = true; } if (child.mWinAnimator != universeBackground) { - addInputWindowHandleLw(inputWindowHandle, child, flags, privateFlags, type, - isVisible, hasFocus, hasWallpaper); + addInputWindowHandleLw(inputWindowHandle, child, flags, type, isVisible, + hasFocus, hasWallpaper); } } } diff --git a/services/core/java/com/android/server/wm/WindowAnimator.java b/services/core/java/com/android/server/wm/WindowAnimator.java index c002ddf..82e4bb1 100644 --- a/services/core/java/com/android/server/wm/WindowAnimator.java +++ b/services/core/java/com/android/server/wm/WindowAnimator.java @@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER; import static android.view.WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import static com.android.server.wm.WindowManagerService.DEBUG_KEYGUARD; import static com.android.server.wm.WindowManagerService.LayoutFields.SET_UPDATE_ROTATION; import static com.android.server.wm.WindowManagerService.LayoutFields.SET_WALLPAPER_MAY_CHANGE; @@ -330,7 +331,9 @@ public class WindowAnimator { + " anim=" + win.mWinAnimator.mAnimation); } else if (mPolicy.canBeForceHidden(win, win.mAttrs)) { final boolean hideWhenLocked = !((win.mIsImWindow && showImeOverKeyguard) || - (appShowWhenLocked != null && appShowWhenLocked == win.mAppToken)); + (appShowWhenLocked != null && (appShowWhenLocked == win.mAppToken || + // Show error dialogs over apps that dismiss keyguard. + (win.mAttrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0))); if (((mForceHiding == KEYGUARD_ANIMATING_IN) && (!winAnimator.isAnimating() || hideWhenLocked)) || ((mForceHiding == KEYGUARD_SHOWN) && hideWhenLocked)) { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 318ff0e..6cb1e4a 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -10791,9 +10791,7 @@ public class WindowManagerService extends IWindowManager.Stub boolean canReceiveKeys, boolean hasFocus, boolean touchFullscreen) { synchronized (mWindowMap) { FakeWindowImpl fw = new FakeWindowImpl(this, looper, inputEventReceiverFactory, - name, windowType, - layoutParamsFlags, layoutParamsPrivateFlags, canReceiveKeys, - hasFocus, touchFullscreen); + name, windowType, layoutParamsFlags, canReceiveKeys, hasFocus, touchFullscreen); int i=0; while (i<mFakeWindows.size()) { if (mFakeWindows.get(i).mWindowLayer <= fw.mWindowLayer) { diff --git a/services/core/jni/com_android_server_input_InputWindowHandle.cpp b/services/core/jni/com_android_server_input_InputWindowHandle.cpp index 03bf7eb..46ec1f4 100644 --- a/services/core/jni/com_android_server_input_InputWindowHandle.cpp +++ b/services/core/jni/com_android_server_input_InputWindowHandle.cpp @@ -36,7 +36,6 @@ static struct { jfieldID inputChannel; jfieldID name; jfieldID layoutParamsFlags; - jfieldID layoutParamsPrivateFlags; jfieldID layoutParamsType; jfieldID dispatchingTimeoutNanos; jfieldID frameLeft; @@ -113,8 +112,6 @@ bool NativeInputWindowHandle::updateInfo() { mInfo->layoutParamsFlags = env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsFlags); - mInfo->layoutParamsPrivateFlags = env->GetIntField(obj, - gInputWindowHandleClassInfo.layoutParamsPrivateFlags); mInfo->layoutParamsType = env->GetIntField(obj, gInputWindowHandleClassInfo.layoutParamsType); mInfo->dispatchingTimeout = env->GetLongField(obj, @@ -251,9 +248,6 @@ int register_android_server_InputWindowHandle(JNIEnv* env) { GET_FIELD_ID(gInputWindowHandleClassInfo.layoutParamsFlags, clazz, "layoutParamsFlags", "I"); - GET_FIELD_ID(gInputWindowHandleClassInfo.layoutParamsPrivateFlags, clazz, - "layoutParamsPrivateFlags", "I"); - GET_FIELD_ID(gInputWindowHandleClassInfo.layoutParamsType, clazz, "layoutParamsType", "I"); |