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

Commit ac3d12d5 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

Change-Id: Ib2ee4399c9d0f0892e3c0894e245db96d6496e33
parents c4dc4bc6 6dd11b53
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);
            }
        }