// Path: app/src/main/java/com/kuahusg/weather/App.java
// public class App extends Application {
//     private static Context context;
// //    private RefWatcher watcher;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
// 
//         CrashHandler crashHandler = CrashHandler.getInstance();
//         crashHandler.init();
// 
// /*        if (LeakCanary.isInAnalyzerProcess(this)) {
//             return;
//         }
//         watcher = LeakCanary.install(this);*/
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// 
// /*    public static RefWatcher getWatcher(Context context) {
//         App app = (App) context.getApplicationContext();
//         return app.watcher;
//     }*/
// }


import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.kuahusg.weather.App;
package com.kuahusg.weather.util;



/**
 * Created by kuahusg on 16-9-27.
 */

public class PreferenceUtil {
    SharedPreferences sharedPreferences;
    SharedPreferences.Editor editor;
    public static final String PREF_HAS_LOAD_ALL_CITY = "hasLoadAllCity";
    public static final String PREF_SELECTED_CITY = "selectCity";
    public static final String PREF_WOEID = "woeid";
    public static final String PREF_CITY_SIMPLE_NAME = "selectCitySimpleName";
    public static final String PREF_AUTO_UPDATE = "auto_update";

    private PreferenceUtil() {

    }

    public static PreferenceUtil getInstance() {
        return InstanceHolder.INSTANCE;
    }


    public SharedPreferences getSharedPreferences() {
// Path: app/src/main/java/com/kuahusg/weather/App.java
// public class App extends Application {
//     private static Context context;
// //    private RefWatcher watcher;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
// 
//         CrashHandler crashHandler = CrashHandler.getInstance();
//         crashHandler.init();
// 
// /*        if (LeakCanary.isInAnalyzerProcess(this)) {
//             return;
//         }
//         watcher = LeakCanary.install(this);*/
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// 
// /*    public static RefWatcher getWatcher(Context context) {
//         App app = (App) context.getApplicationContext();
//         return app.watcher;
//     }*/
// }


// Path: app/src/main/java/com/kuahusg/weather/util/PreferenceUtil.java
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.kuahusg.weather.App;

package com.kuahusg.weather.util;



/**
 * Created by kuahusg on 16-9-27.
 */

public class PreferenceUtil {
    SharedPreferences sharedPreferences;
    SharedPreferences.Editor editor;
    public static final String PREF_HAS_LOAD_ALL_CITY = "hasLoadAllCity";
    public static final String PREF_SELECTED_CITY = "selectCity";
    public static final String PREF_WOEID = "woeid";
    public static final String PREF_CITY_SIMPLE_NAME = "selectCitySimpleName";
    public static final String PREF_AUTO_UPDATE = "auto_update";

    private PreferenceUtil() {

    }

    public static PreferenceUtil getInstance() {
        return InstanceHolder.INSTANCE;
    }


    public SharedPreferences getSharedPreferences() {
        if (sharedPreferences == null)