Show error dialogs over apps that dismiss keyguard automerge: c08eab8

automerge: 2b9e9f4

* commit '2b9e9f417f88ff385b37f01257748b050e505eb6':
  Show error dialogs over apps that dismiss keyguard
This commit is contained in:
Craig Mautner
2014-11-12 03:16:39 +00:00
committed by android-build-merger
7 changed files with 11 additions and 21 deletions

View File

@@ -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.

View File

@@ -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;

View File

@@ -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;

View File

@@ -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);
}
}
}

View File

@@ -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)) {

View File

@@ -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) {

View File

@@ -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");