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

Commit 97e0e429 authored by Daniel Nishi's avatar Daniel Nishi Committed by Android (Google) Code Review
Browse files

Merge "Add floats to the SecureSettings shadow." into oc-dr1-dev

parents 3161375f 3ff4b933
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -76,6 +76,29 @@ public class ShadowSecureSettings {
        return value == null ? defaultValue : value;
    }

    @Implementation
    public static boolean putFloat(ContentResolver resolver, String name, float value) {
        mValueMap.put(name, value);
        return true;
    }

    @Implementation
    public static boolean putFloatForUser(ContentResolver cr, String name, float value,
            float userHandle) {
        return putFloat(cr, name, value);
    }

    @Implementation
    public static float getFloatForUser(ContentResolver cr, String name, float def, int userHandle) {
        return getFloat(cr, name, def);
    }

    @Implementation
    public static float getFloat(ContentResolver resolver, String name, float defaultValue) {
        Float value = (Float) mValueMap.get(name);
        return value == null ? defaultValue : value;
    }

    public static void clear() {
        mValueMap.clear();
    }