mMaximumObscuringOpacityForTouch should remain valid

set mMaximumObscuringOpacityForTouch to the defaul value in case
that the system settings contains an invalid value.

Merged-In: I4f15a7573913b503635995d26053bed9aa753a45
Change-Id: I4f15a7573913b503635995d26053bed9aa753a45
Test: presubmit
Bug: 274213741
This commit is contained in:
Ady Abraham
2022-08-08 17:50:32 +00:00
committed by Vishnu Nair
parent 83623aaa8e
commit db46ba61fc

View File

@@ -913,6 +913,11 @@ public class WindowManagerService extends IWindowManager.Stub
mMaximumObscuringOpacityForTouch = Settings.Global.getFloat(resolver,
Settings.Global.MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH,
InputManager.DEFAULT_MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH);
if (mMaximumObscuringOpacityForTouch < 0.0f
|| mMaximumObscuringOpacityForTouch > 1.0f) {
mMaximumObscuringOpacityForTouch =
InputManager.DEFAULT_MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH;
}
}
void updateSystemUiSettings(boolean handleChange) {