// Path: app/src/main/java/com/yoga/oneweather/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context context;
//     private static Gson mGson = new Gson();
// 
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         LitePal.initialize(context);
//         DBManager.getInstance().copyCitysToDB();
// 
// 
// 
//     }
// 
//     public static Gson getGson() {
//         return mGson;
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// }


import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.yoga.oneweather.MyApplication;
package com.yoga.oneweather.util;



/**
 * Created by wyg on 2017/7/26.
 */

public class PreferencesUtil {

    public static SharedPreferences getPreferences(){
// Path: app/src/main/java/com/yoga/oneweather/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context context;
//     private static Gson mGson = new Gson();
// 
// 
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         context = getApplicationContext();
//         LitePal.initialize(context);
//         DBManager.getInstance().copyCitysToDB();
// 
// 
// 
//     }
// 
//     public static Gson getGson() {
//         return mGson;
//     }
// 
//     public static Context getContext() {
//         return context;
//     }
// }


// Path: app/src/main/java/com/yoga/oneweather/util/PreferencesUtil.java
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.yoga.oneweather.MyApplication;

package com.yoga.oneweather.util;



/**
 * Created by wyg on 2017/7/26.
 */

public class PreferencesUtil {

    public static SharedPreferences getPreferences(){
        return PreferenceManager.getDefaultSharedPreferences(MyApplication.getContext());