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

Commit 6dd11b53 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents ad9c39d5 9df4ad11
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);
            }
        }