* commit 'e62fa825794967c2067be86e8b57b83f4b82ee1c': Merge from master: fix issue #7966357: Super lights out mode vs. volume dialog
This commit is contained in:
@ -302,6 +302,7 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
|
|||||||
lp.type = LayoutParams.TYPE_VOLUME_OVERLAY;
|
lp.type = LayoutParams.TYPE_VOLUME_OVERLAY;
|
||||||
lp.width = LayoutParams.WRAP_CONTENT;
|
lp.width = LayoutParams.WRAP_CONTENT;
|
||||||
lp.height = LayoutParams.WRAP_CONTENT;
|
lp.height = LayoutParams.WRAP_CONTENT;
|
||||||
|
lp.privateFlags |= LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR;
|
||||||
window.setAttributes(lp);
|
window.setAttributes(lp);
|
||||||
window.addFlags(LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_NOT_TOUCH_MODAL
|
window.addFlags(LayoutParams.FLAG_NOT_FOCUSABLE | LayoutParams.FLAG_NOT_TOUCH_MODAL
|
||||||
| LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);
|
| LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);
|
||||||
|
@ -945,6 +945,13 @@ public interface WindowManager extends ViewManager {
|
|||||||
* {@hide} */
|
* {@hide} */
|
||||||
public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010;
|
public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS = 0x00000010;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Special flag for the volume overlay: force the window manager out of "hide nav bar"
|
||||||
|
* mode while the window is on screen.
|
||||||
|
*
|
||||||
|
* {@hide} */
|
||||||
|
public static final int PRIVATE_FLAG_FORCE_SHOW_NAV_BAR = 0x00000020;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Control flags that are private to the platform.
|
* Control flags that are private to the platform.
|
||||||
* @hide
|
* @hide
|
||||||
|
@ -412,6 +412,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
boolean mForceStatusBar;
|
boolean mForceStatusBar;
|
||||||
boolean mForceStatusBarFromKeyguard;
|
boolean mForceStatusBarFromKeyguard;
|
||||||
boolean mHideLockScreen;
|
boolean mHideLockScreen;
|
||||||
|
boolean mForcingShowNavBar;
|
||||||
|
int mForcingShowNavBarLayer;
|
||||||
|
|
||||||
// States of keyguard dismiss.
|
// States of keyguard dismiss.
|
||||||
private static final int DISMISS_KEYGUARD_NONE = 0; // Keyguard not being dismissed.
|
private static final int DISMISS_KEYGUARD_NONE = 0; // Keyguard not being dismissed.
|
||||||
@ -2936,6 +2938,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
mTopFullscreenOpaqueWindowState = null;
|
mTopFullscreenOpaqueWindowState = null;
|
||||||
mForceStatusBar = false;
|
mForceStatusBar = false;
|
||||||
mForceStatusBarFromKeyguard = false;
|
mForceStatusBarFromKeyguard = false;
|
||||||
|
mForcingShowNavBar = false;
|
||||||
|
mForcingShowNavBarLayer = -1;
|
||||||
|
|
||||||
mHideLockScreen = false;
|
mHideLockScreen = false;
|
||||||
mAllowLockscreenWhenOn = false;
|
mAllowLockscreenWhenOn = false;
|
||||||
@ -2950,6 +2954,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
WindowManager.LayoutParams attrs) {
|
WindowManager.LayoutParams attrs) {
|
||||||
if (DEBUG_LAYOUT) Slog.i(TAG, "Win " + win + ": isVisibleOrBehindKeyguardLw="
|
if (DEBUG_LAYOUT) Slog.i(TAG, "Win " + win + ": isVisibleOrBehindKeyguardLw="
|
||||||
+ win.isVisibleOrBehindKeyguardLw());
|
+ win.isVisibleOrBehindKeyguardLw());
|
||||||
|
if (mTopFullscreenOpaqueWindowState == null && (win.getAttrs().privateFlags
|
||||||
|
&WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR) != 0) {
|
||||||
|
if (mForcingShowNavBarLayer < 0) {
|
||||||
|
mForcingShowNavBar = true;
|
||||||
|
mForcingShowNavBarLayer = win.getSurfaceLayer();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mTopFullscreenOpaqueWindowState == null &&
|
if (mTopFullscreenOpaqueWindowState == null &&
|
||||||
win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {
|
win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {
|
||||||
if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
|
if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
|
||||||
@ -4478,9 +4489,13 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
// will quickly lose focus once it correctly gets hidden.
|
// will quickly lose focus once it correctly gets hidden.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
final int visibility = mFocusedWindow.getSystemUiVisibility()
|
int tmpVisibility = mFocusedWindow.getSystemUiVisibility()
|
||||||
& ~mResettingSystemUiFlags
|
& ~mResettingSystemUiFlags
|
||||||
& ~mForceClearedSystemUiFlags;
|
& ~mForceClearedSystemUiFlags;
|
||||||
|
if (mForcingShowNavBar && mFocusedWindow.getSurfaceLayer() < mForcingShowNavBarLayer) {
|
||||||
|
tmpVisibility &= ~View.SYSTEM_UI_CLEARABLE_FLAGS;
|
||||||
|
}
|
||||||
|
final int visibility = tmpVisibility;
|
||||||
int diff = visibility ^ mLastSystemUiFlags;
|
int diff = visibility ^ mLastSystemUiFlags;
|
||||||
final boolean needsMenu = mFocusedWindow.getNeedsMenuLw(mTopFullscreenOpaqueWindowState);
|
final boolean needsMenu = mFocusedWindow.getNeedsMenuLw(mTopFullscreenOpaqueWindowState);
|
||||||
if (diff == 0 && mLastFocusNeedsMenu == needsMenu
|
if (diff == 0 && mLastFocusNeedsMenu == needsMenu
|
||||||
@ -4667,6 +4682,11 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
|||||||
pw.print(prefix); pw.print("mTopFullscreenOpaqueWindowState=");
|
pw.print(prefix); pw.print("mTopFullscreenOpaqueWindowState=");
|
||||||
pw.println(mTopFullscreenOpaqueWindowState);
|
pw.println(mTopFullscreenOpaqueWindowState);
|
||||||
}
|
}
|
||||||
|
if (mForcingShowNavBar) {
|
||||||
|
pw.print(prefix); pw.print("mForcingShowNavBar=");
|
||||||
|
pw.println(mForcingShowNavBar); pw.print( "mForcingShowNavBarLayer=");
|
||||||
|
pw.println(mForcingShowNavBarLayer);
|
||||||
|
}
|
||||||
pw.print(prefix); pw.print("mTopIsFullscreen="); pw.print(mTopIsFullscreen);
|
pw.print(prefix); pw.print("mTopIsFullscreen="); pw.print(mTopIsFullscreen);
|
||||||
pw.print(" mHideLockScreen="); pw.println(mHideLockScreen);
|
pw.print(" mHideLockScreen="); pw.println(mHideLockScreen);
|
||||||
pw.print(prefix); pw.print("mForceStatusBar="); pw.print(mForceStatusBar);
|
pw.print(prefix); pw.print("mForceStatusBar="); pw.print(mForceStatusBar);
|
||||||
|
@ -3869,7 +3869,7 @@ public final class ActivityManagerService extends ActivityManagerNative
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean didSomething = killPackageProcessesLocked(name, appId, userId,
|
boolean didSomething = killPackageProcessesLocked(name, appId, userId,
|
||||||
-100, callerWillRestart, false, doit, evenPersistent,
|
-100, callerWillRestart, true, doit, evenPersistent,
|
||||||
name == null ? ("force stop user " + userId) : ("force stop " + name));
|
name == null ? ("force stop user " + userId) : ("force stop " + name));
|
||||||
|
|
||||||
TaskRecord lastTask = null;
|
TaskRecord lastTask = null;
|
||||||
|
Reference in New Issue
Block a user