package app.android.gambit.ui;


import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;


final class Preferences
{
	public static final String PREFERENCE_SYNC_GOOGLE_ACCOUNT_NAME = "sync_google_account_name";
	public static final String PREFERENCE_SYNC_SPREADSHEET_KEY = "sync_spreadsheet_key";

	private Preferences() {
	}

	public static void set(Context activityContext, String key, String value) {
		SharedPreferences.Editor preferencesEditor = getPreferencesEditor(activityContext);

		preferencesEditor.putString(key, value);

		preferencesEditor.commit();
	}

	private static SharedPreferences.Editor getPreferencesEditor(Context activityContext) {
		return getSharedPreferences(activityContext).edit();
	}

	private static SharedPreferences getSharedPreferences(Context activityContext) {
		return PreferenceManager.getDefaultSharedPreferences(activityContext.getApplicationContext());
	}

	public static void set(Context activityContext, String key, boolean value) {
		SharedPreferences.Editor preferencesEditor = getPreferencesEditor(activityContext);

		preferencesEditor.putBoolean(key, value);

		preferencesEditor.commit();
	}

	public static String getString(Context activityContext, String key) {
		return getSharedPreferences(activityContext).getString(key, new String());
	}

	public static boolean getBoolean(Context activityContext, String key) {
		return getSharedPreferences(activityContext).getBoolean(key, false);
	}
}

@@ -411,33 +411,25 @@
 set(Context 
-activityC
+c
 ontext, Stri
@@ -516,33 +516,25 @@
 encesEditor(
-activityC
+c
 ontext);%0A%0A%09%09
@@ -675,33 +675,25 @@
 tor(Context 
-activityC
+c
 ontext) %7B%0A%09%09
@@ -716,33 +716,25 @@
 Preferences(
-activityC
+c
 ontext).edit
@@ -800,33 +800,25 @@
 ces(Context 
-activityC
+c
 ontext) %7B%0A%09%09
@@ -866,33 +866,25 @@
 Preferences(
-activityC
+c
 ontext.getAp
@@ -936,33 +936,25 @@
 set(Context 
-activityC
+c
 ontext, Stri
@@ -1046,25 +1046,17 @@
 sEditor(
-activityC
+c
 ontext);
@@ -1172,33 +1172,25 @@
 ing(Context 
-activityC
+c
 ontext, Stri
@@ -1225,33 +1225,25 @@
 Preferences(
-activityC
+c
 ontext).getS
@@ -1314,25 +1314,17 @@
 Context 
-activityC
+c
 ontext, 
@@ -1371,17 +1371,9 @@
 ces(
-activityC
+c
 onte

Rename activityContext argument everywhere in Preferences.