am 93df07a1: Merge "Show the keyguard if unsecure window on top. DO NOT MERGE." into klp-dev
* commit '93df07a1b72488b64354098cd00dff1d36b76b12': Show the keyguard if unsecure window on top. DO NOT MERGE.
This commit is contained in:
@@ -381,6 +381,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
static final Rect mTmpNavigationFrame = new Rect();
|
static final Rect mTmpNavigationFrame = new Rect();
|
||||||
|
|
||||||
WindowState mTopFullscreenOpaqueWindowState;
|
WindowState mTopFullscreenOpaqueWindowState;
|
||||||
|
boolean mHideWindowBehindKeyguard;
|
||||||
boolean mTopIsFullscreen;
|
boolean mTopIsFullscreen;
|
||||||
boolean mForceStatusBar;
|
boolean mForceStatusBar;
|
||||||
boolean mForceStatusBarFromKeyguard;
|
boolean mForceStatusBarFromKeyguard;
|
||||||
@@ -3365,6 +3366,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
@Override
|
@Override
|
||||||
public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) {
|
public void beginPostLayoutPolicyLw(int displayWidth, int displayHeight) {
|
||||||
mTopFullscreenOpaqueWindowState = null;
|
mTopFullscreenOpaqueWindowState = null;
|
||||||
|
mHideWindowBehindKeyguard = false;
|
||||||
mForceStatusBar = false;
|
mForceStatusBar = false;
|
||||||
mForceStatusBarFromKeyguard = false;
|
mForceStatusBarFromKeyguard = false;
|
||||||
mForcingShowNavBar = false;
|
mForcingShowNavBar = false;
|
||||||
@@ -3400,7 +3402,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
if (attrs.type == TYPE_KEYGUARD) {
|
if (attrs.type == TYPE_KEYGUARD) {
|
||||||
mShowingLockscreen = true;
|
mShowingLockscreen = true;
|
||||||
}
|
}
|
||||||
boolean applyWindow = attrs.type >= FIRST_APPLICATION_WINDOW
|
boolean appWindow = attrs.type >= FIRST_APPLICATION_WINDOW
|
||||||
&& attrs.type <= LAST_APPLICATION_WINDOW;
|
&& attrs.type <= LAST_APPLICATION_WINDOW;
|
||||||
if (attrs.type == TYPE_DREAM) {
|
if (attrs.type == TYPE_DREAM) {
|
||||||
// If the lockscreen was showing when the dream started then wait
|
// If the lockscreen was showing when the dream started then wait
|
||||||
@@ -3408,30 +3410,35 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
if (!mDreamingLockscreen
|
if (!mDreamingLockscreen
|
||||||
|| (win.isVisibleLw() && win.hasDrawnLw())) {
|
|| (win.isVisibleLw() && win.hasDrawnLw())) {
|
||||||
mShowingDream = true;
|
mShowingDream = true;
|
||||||
applyWindow = true;
|
appWindow = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (applyWindow
|
|
||||||
&& attrs.x == 0 && attrs.y == 0
|
final boolean showWhenLocked = (attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
|
||||||
&& attrs.width == WindowManager.LayoutParams.MATCH_PARENT
|
if (appWindow) {
|
||||||
&& attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
|
if (attrs.x == 0 && attrs.y == 0
|
||||||
if (DEBUG_LAYOUT) Slog.v(TAG, "Fullscreen window: " + win);
|
&& attrs.width == WindowManager.LayoutParams.MATCH_PARENT
|
||||||
mTopFullscreenOpaqueWindowState = win;
|
&& attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
|
||||||
if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
|
if (DEBUG_LAYOUT) Slog.v(TAG, "Fullscreen window: " + win);
|
||||||
if (DEBUG_LAYOUT) Slog.v(TAG, "Setting mHideLockScreen to true by win " + win);
|
mTopFullscreenOpaqueWindowState = win;
|
||||||
mHideLockScreen = true;
|
if (showWhenLocked && !mHideWindowBehindKeyguard) {
|
||||||
mForceStatusBarFromKeyguard = false;
|
if (DEBUG_LAYOUT) Slog.v(TAG, "Setting mHideLockScreen to true by win " + win);
|
||||||
}
|
mHideLockScreen = true;
|
||||||
if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0
|
mForceStatusBarFromKeyguard = false;
|
||||||
&& mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
|
}
|
||||||
if (DEBUG_LAYOUT) Slog.v(TAG, "Setting mDismissKeyguard true by win " + win);
|
if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0
|
||||||
mDismissKeyguard = mWinDismissingKeyguard == win ?
|
&& mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
|
||||||
DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
|
if (DEBUG_LAYOUT) Slog.v(TAG, "Setting mDismissKeyguard true by win " + win);
|
||||||
mWinDismissingKeyguard = win;
|
mDismissKeyguard = mWinDismissingKeyguard == win ?
|
||||||
mForceStatusBarFromKeyguard = mShowingLockscreen && isKeyguardSecure();
|
DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
|
||||||
}
|
mWinDismissingKeyguard = win;
|
||||||
if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
|
mForceStatusBarFromKeyguard = mShowingLockscreen && isKeyguardSecure();
|
||||||
mAllowLockscreenWhenOn = true;
|
}
|
||||||
|
if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
|
||||||
|
mAllowLockscreenWhenOn = true;
|
||||||
|
}
|
||||||
|
} else if (!showWhenLocked) {
|
||||||
|
mHideWindowBehindKeyguard = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3517,7 +3524,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
if (mKeyguard != null) {
|
if (mKeyguard != null) {
|
||||||
if (localLOGV) Slog.v(TAG, "finishPostLayoutPolicyLw: mHideKeyguard="
|
if (localLOGV) Slog.v(TAG, "finishPostLayoutPolicyLw: mHideKeyguard="
|
||||||
+ mHideLockScreen);
|
+ mHideLockScreen);
|
||||||
if (mDismissKeyguard != DISMISS_KEYGUARD_NONE && !mKeyguardDelegate.isSecure()) {
|
if (mDismissKeyguard != DISMISS_KEYGUARD_NONE && !isKeyguardSecure()) {
|
||||||
if (mKeyguard.hideLw(true)) {
|
if (mKeyguard.hideLw(true)) {
|
||||||
changes |= FINISH_LAYOUT_REDO_LAYOUT
|
changes |= FINISH_LAYOUT_REDO_LAYOUT
|
||||||
| FINISH_LAYOUT_REDO_CONFIG
|
| FINISH_LAYOUT_REDO_CONFIG
|
||||||
|
|||||||
Reference in New Issue
Block a user