@@ -0,0 +1,1106 @@
+package com.astoev.cave.survey.util;%0A%0Aimport android.content.Context;%0Aimport android.content.SharedPreferences;%0A%0A/**%0A * Created by astoev on 12/27/13.%0A */%0Apublic class ConfigUtil %7B%0A%0A    private static final String SHARED_PREFS_KEY = %22CaveSurvey%22;%0A    public static final String PROP_CURR_PROJECT = %22curr_project_id%22;%0A    public static final String PROP_CURR_LEG = %22curr_leg_id%22;%0A%0A    private static Context mAppContext;%0A%0A    public static void setContext(Context aContext) %7B%0A        mAppContext = aContext;%0A    %7D%0A%0A    public static Context getContext() %7B%0A        return mAppContext;%0A    %7D%0A%0A    public static Integer getIntProperty(String aName) %7B%0A        return getPrefs(Context.MODE_WORLD_READABLE).getInt(aName, 0);%0A    %7D%0A%0A    public static boolean setIntProperty(String aName, Integer aValue) %7B%0A        SharedPreferences.Editor editor = getPrefs(Context.MODE_WORLD_WRITEABLE).edit();%0A        editor.putInt(aName, aValue);%0A        return editor.commit();%0A    %7D%0A%0A    private static SharedPreferences getPrefs(int aMode) %7B%0A        return mAppContext.getSharedPreferences(SHARED_PREFS_KEY, aMode);%0A    %7D%0A%0A%7D%0A

introduce utility for storing curr project and leg as oposite to static locals