Allow to keep screen on only if window can be seen
am: b20addbdfb
Change-Id: I09e12733e8073814f8d16c3d4025db8f042c2f25
This commit is contained in:
@@ -1483,7 +1483,7 @@ class WindowSurfacePlacer {
|
|||||||
mObscured = true;
|
mObscured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w.mHasSurface) {
|
if (w.mHasSurface && canBeSeen) {
|
||||||
if ((attrFlags&FLAG_KEEP_SCREEN_ON) != 0) {
|
if ((attrFlags&FLAG_KEEP_SCREEN_ON) != 0) {
|
||||||
mHoldScreen = w.mSession;
|
mHoldScreen = w.mSession;
|
||||||
mHoldScreenWindow = w;
|
mHoldScreenWindow = w;
|
||||||
@@ -1506,14 +1506,11 @@ class WindowSurfacePlacer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final int type = attrs.type;
|
final int type = attrs.type;
|
||||||
if (canBeSeen
|
if (type == TYPE_SYSTEM_DIALOG || type == TYPE_SYSTEM_ERROR
|
||||||
&& (type == TYPE_SYSTEM_DIALOG
|
|| (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0) {
|
||||||
|| type == TYPE_SYSTEM_ERROR
|
|
||||||
|| (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0)) {
|
|
||||||
mSyswin = true;
|
mSyswin = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canBeSeen) {
|
|
||||||
// This function assumes that the contents of the default display are
|
// This function assumes that the contents of the default display are
|
||||||
// processed first before secondary displays.
|
// processed first before secondary displays.
|
||||||
final DisplayContent displayContent = w.getDisplayContent();
|
final DisplayContent displayContent = w.getDisplayContent();
|
||||||
@@ -1545,7 +1542,6 @@ class WindowSurfacePlacer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void updateAllDrawnLocked(DisplayContent displayContent) {
|
private void updateAllDrawnLocked(DisplayContent displayContent) {
|
||||||
// See if any windows have been drawn, so they (and others
|
// See if any windows have been drawn, so they (and others
|
||||||
|
|||||||
Reference in New Issue
Block a user