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

Commit 1bfd5d40 authored by Dave Mankoff's avatar Dave Mankoff Committed by android-build-merger
Browse files

Merge "Replace synchronous calls to shared prefs with async calls." into qt-dev am: 61240f6c

am: 98d9a61b

Change-Id: Ie27fc99a02c81726ca56d6cce7861584525dde08
parents 99773909 98d9a61b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -42,12 +42,12 @@ public class PluginPrefs {
    }

    public Set<String> getPluginList() {
        return mPluginActions;
        return new ArraySet<>(mPluginActions);
    }

    public synchronized void addAction(String action) {
        if (mPluginActions.add(action)){
            mSharedPrefs.edit().putStringSet(PLUGIN_ACTIONS, mPluginActions).commit();
            mSharedPrefs.edit().putStringSet(PLUGIN_ACTIONS, mPluginActions).apply();
        }
    }

@@ -56,6 +56,6 @@ public class PluginPrefs {
    }

    public static void setHasPlugins(Context context) {
        context.getSharedPreferences(PREFS, 0).edit().putBoolean(HAS_PLUGINS, true).commit();
        context.getSharedPreferences(PREFS, 0).edit().putBoolean(HAS_PLUGINS, true).apply();
    }
}