// Path: client/FourFun/app/src/main/java/com/joker/fourfun/FourFun.java
// public class FourFun extends Application {
//     private static FourFun instance;
// 
//     public static FourFun getInstance() {
//         return instance;
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         instance = this;
//         if (LeakCanary.isInAnalyzerProcess(this)) {
//             return;
//         }
//         LeakCanary.install(this);
//     }
// 
//     public Context getContext() {
//         return instance.getApplicationContext();
//     }
// }


import android.app.Activity;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import com.joker.fourfun.FourFun;
import static android.content.Context.MODE_PRIVATE;
package com.joker.fourfun.utils;




/**
 * Created by joker on 2017/1/4.
 */

public class PreferenceUtil {
    public static final String DEFAULT_PREFERENCES_FILE = "fourfun";

    public static SharedPreferences getSp() {
// Path: client/FourFun/app/src/main/java/com/joker/fourfun/FourFun.java
// public class FourFun extends Application {
//     private static FourFun instance;
// 
//     public static FourFun getInstance() {
//         return instance;
//     }
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         instance = this;
//         if (LeakCanary.isInAnalyzerProcess(this)) {
//             return;
//         }
//         LeakCanary.install(this);
//     }
// 
//     public Context getContext() {
//         return instance.getApplicationContext();
//     }
// }


// Path: client/FourFun/app/src/main/java/com/joker/fourfun/utils/PreferenceUtil.java
import android.app.Activity;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import com.joker.fourfun.FourFun;
import static android.content.Context.MODE_PRIVATE;

package com.joker.fourfun.utils;




/**
 * Created by joker on 2017/1/4.
 */

public class PreferenceUtil {
    public static final String DEFAULT_PREFERENCES_FILE = "fourfun";

    public static SharedPreferences getSp() {
        return FourFun.getInstance().getContext().getSharedPreferences