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

Commit 40e83c55 authored by Tarandeep Singh's avatar Tarandeep Singh Committed by android-build-merger
Browse files

Merge "Fixed IMMS.DebugFlag#refresh() default value" into pi-dev am: 6dd11b53

am: ac3d12d5

Change-Id: I79b3563cd7b505ba942de9e7aeb67db24927973c
parents 8d778978 ac3d12d5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -263,17 +263,19 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
    private static final class DebugFlag {
        private static final Object LOCK = new Object();
        private final String mKey;
        private final boolean mDefaultValue;
        @GuardedBy("LOCK")
        private boolean mValue;

        public DebugFlag(String key, boolean defaultValue) {
            mKey = key;
            mDefaultValue = defaultValue;
            mValue = SystemProperties.getBoolean(key, defaultValue);
        }

        void refresh() {
            synchronized (LOCK) {
                mValue = SystemProperties.getBoolean(mKey, true);
                mValue = SystemProperties.getBoolean(mKey, mDefaultValue);
            }
        }