diff options
author | Dan Sandler <dsandler@android.com> | 2014-04-14 17:54:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-14 17:54:22 +0000 |
commit | 352e108259bcb3305f034cfb042287d43a5e8f80 (patch) | |
tree | 9335c30335ee0082a86bbdeb3fb5fdd75dfe24fc /services | |
parent | db8b130a19484cb6018667905e64d42ab793654f (diff) | |
parent | f3e3140696ca775fe2f62868addb1eec2b1c18fa (diff) | |
download | frameworks_base-352e108259bcb3305f034cfb042287d43a5e8f80.zip frameworks_base-352e108259bcb3305f034cfb042287d43a5e8f80.tar.gz frameworks_base-352e108259bcb3305f034cfb042287d43a5e8f80.tar.bz2 |
Merge "Merge remote-tracking branch 'goog/master-lockscreen-dev'"
Diffstat (limited to 'services')
4 files changed, 19 insertions, 23 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java index 038686b..3619112 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityManagerService.java @@ -3013,7 +3013,6 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub { return AccessibilityWindowInfo.TYPE_INPUT_METHOD; } - case WindowManager.LayoutParams.TYPE_KEYGUARD: case WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG: case WindowManager.LayoutParams.TYPE_NAVIGATION_BAR: case WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL: diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index b27c8d6..f02c0e6 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -284,7 +284,7 @@ final class InputMonitor implements InputManagerService.WindowManagerCallbacks { final boolean hasFocus = (child == mInputFocus); final boolean isVisible = child.isVisibleLw(); final boolean hasWallpaper = (child == mService.mWallpaperTarget) - && (type != WindowManager.LayoutParams.TYPE_KEYGUARD); + && (privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD) == 0; final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY); // If there's a drag in progress and 'child' is a potential drop target, diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 02d3d57..ad256c8 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -1893,7 +1893,9 @@ public class WindowManagerService extends IWindowManager.Stub int insertionIndex = 0; if (visible && foundW != null) { final int type = foundW.mAttrs.type; - if (type == TYPE_KEYGUARD || type == TYPE_KEYGUARD_SCRIM) { + final int privateFlags = foundW.mAttrs.privateFlags; + if ((privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 + || type == TYPE_KEYGUARD_SCRIM) { insertionIndex = windows.indexOf(foundW); } } @@ -5291,6 +5293,13 @@ public class WindowManagerService extends IWindowManager.Stub performEnableScreen(); } + @Override + public void enableScreenIfNeeded() { + synchronized (mWindowMap) { + enableScreenIfNeededLocked(); + } + } + void enableScreenIfNeededLocked() { if (DEBUG_BOOT) { RuntimeException here = new RuntimeException("here"); @@ -5355,18 +5364,6 @@ public class WindowManagerService extends IWindowManager.Stub final int N = windows.size(); for (int i=0; i<N; i++) { WindowState w = windows.get(i); - if (w.mAttrs.type == TYPE_KEYGUARD) { - // Only if there is a keyguard attached to the window manager - // will we consider ourselves as having a keyguard. If it - // isn't attached, we don't know if it wants to be shown or - // hidden. If it is attached, we will say we have a keyguard - // if the window doesn't want to be visible, because in that - // case it explicitly doesn't want to be shown so we should - // not delay turning the screen on for it. - boolean vis = w.mViewVisibility == View.VISIBLE - && w.mPolicyVisibility; - haveKeyguard = !vis; - } if (w.isVisibleLw() && !w.mObscured && !w.isDrawnLw()) { return; } @@ -5377,8 +5374,8 @@ public class WindowManagerService extends IWindowManager.Stub haveApp = true; } else if (w.mAttrs.type == TYPE_WALLPAPER) { haveWallpaper = true; - } else if (w.mAttrs.type == TYPE_KEYGUARD) { - haveKeyguard = true; + } else if (w.mAttrs.type == TYPE_STATUS_BAR) { + haveKeyguard = mPolicy.isKeyguardDrawnLw(); } } } @@ -8335,7 +8332,7 @@ public class WindowManagerService extends IWindowManager.Stub // just don't display"). if (!gone || !win.mHaveFrame || win.mLayoutNeeded || ((win.isConfigChanged() || win.setInsetsChanged()) && - (win.mAttrs.type == TYPE_KEYGUARD || + ((win.mAttrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 || win.mAppToken != null && win.mAppToken.layoutConfigChanges)) || win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) { if (!win.mLayoutAttached) { @@ -8875,8 +8872,8 @@ public class WindowManagerService extends IWindowManager.Stub if (canBeSeen && (type == TYPE_SYSTEM_DIALOG || type == TYPE_RECENTS_OVERLAY - || type == TYPE_KEYGUARD - || type == TYPE_SYSTEM_ERROR)) { + || type == TYPE_SYSTEM_ERROR + || (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0)) { mInnerFields.mSyswin = true; } @@ -8889,7 +8886,7 @@ public class WindowManagerService extends IWindowManager.Stub // content on secondary displays (by forcibly enabling mirroring unless // there is other content we want to show) but still allow opaque // keyguard dialogs to be shown. - if (type == TYPE_DREAM || type == TYPE_KEYGUARD) { + if (type == TYPE_DREAM || (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) { mInnerFields.mObscureApplicationContentOnSecondaryDisplays = true; } mInnerFields.mDisplayHasContent = true; diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index dff75ef..4318b0e 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -23,12 +23,12 @@ import static com.android.server.wm.WindowManagerService.DEBUG_RESIZE; import static com.android.server.wm.WindowManagerService.DEBUG_VISIBILITY; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; +import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_COMPATIBLE_WINDOW; import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG; -import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD; import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import android.app.AppOpsManager; @@ -1010,7 +1010,7 @@ final class WindowState implements WindowManagerPolicy.WindowState { && (mConfiguration == null || (mConfiguration.diff(mService.mCurConfiguration) != 0)); - if (mAttrs.type == TYPE_KEYGUARD) { + if ((mAttrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) { // Retain configuration changed status until resetConfiguration called. mConfigHasChanged |= configChanged; configChanged = mConfigHasChanged; |