Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db46ba61 authored by Ady Abraham's avatar Ady Abraham Committed by Vishnu Nair
Browse files

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
parent 83623aaa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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) {