Merge "Fix premature clearing of clearable sysui flags" into mnc-dev
This commit is contained in:
@@ -10978,6 +10978,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
if (mLastDispatchedSystemUiVisibility == visibility) {
|
if (mLastDispatchedSystemUiVisibility == visibility) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final int globalDiff = (visibility ^ mLastDispatchedSystemUiVisibility)
|
||||||
|
// We are only interested in differences of one of the
|
||||||
|
// clearable flags...
|
||||||
|
& View.SYSTEM_UI_CLEARABLE_FLAGS
|
||||||
|
// ...if it has actually been cleared.
|
||||||
|
& ~visibility;
|
||||||
|
|
||||||
mLastDispatchedSystemUiVisibility = visibility;
|
mLastDispatchedSystemUiVisibility = visibility;
|
||||||
mInputManager.setSystemUiVisibility(visibility);
|
mInputManager.setSystemUiVisibility(visibility);
|
||||||
final WindowList windows = getDefaultWindowListLocked();
|
final WindowList windows = getDefaultWindowListLocked();
|
||||||
@@ -10986,12 +10993,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
WindowState ws = windows.get(i);
|
WindowState ws = windows.get(i);
|
||||||
try {
|
try {
|
||||||
int curValue = ws.mSystemUiVisibility;
|
int curValue = ws.mSystemUiVisibility;
|
||||||
int diff = curValue ^ visibility;
|
int diff = (curValue ^ visibility) & globalDiff;
|
||||||
// We are only interested in differences of one of the
|
|
||||||
// clearable flags...
|
|
||||||
diff &= View.SYSTEM_UI_CLEARABLE_FLAGS;
|
|
||||||
// ...if it has actually been cleared.
|
|
||||||
diff &= ~visibility;
|
|
||||||
int newValue = (curValue&~diff) | (visibility&diff);
|
int newValue = (curValue&~diff) | (visibility&diff);
|
||||||
if (newValue != curValue) {
|
if (newValue != curValue) {
|
||||||
ws.mSeq++;
|
ws.mSeq++;
|
||||||
|
|||||||
Reference in New Issue
Block a user