// Path: app/src/main/java/com/zhenghuiyan/todaything/util/MiscUtil.java
// public class MiscUtil {
//     public static Context appContext = null;
// 
//     private MiscUtil() {}
// 
//     public static void setAppContext(Context c) {
//         appContext = c;
//     }
// 
//     public static Context getAppContext() {
//         return appContext;
//     }
// 
//     /**
//      *
//      * */
// 
//      public static void goToActivity(Activity a, Fragment f, Class<?> b, Bundle bundle, boolean isForResult) {
//         Intent intent = new Intent(a, b);
//         if (bundle != null) {
//             intent.putExtras(bundle);
//         }
//         if (isForResult && (f != null)) {
//             f.startActivityForResult(intent, 0);
//         } else if (isForResult && (f == null)) {
//             a.startActivityForResult(intent, 0);
//         } else {
//             a.startActivity(intent);
//         }
//         a.overridePendingTransition(R.anim.zero_scale_one, R.anim.keep_status);
//     }
// }


import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.zhenghuiyan.todaything.util.MiscUtil;
package com.zhenghuiyan.todaything.data;



/**
 * Created by zhenghuiyan on 2015/2/2.
 */
public class SPManager {
    public SharedPreferences mSharedPreferences;

    public static final String LAST_THING_ID_KEY = "last_thing_id";

    public static final String LAST_SYNC_TIME = "last_sync_time";

    private static class SingletonHolder{
        private static final SPManager instance = new SPManager();
    }

    public static SPManager getInstance() {
        return SingletonHolder.instance;
    }

    private SPManager() {
// Path: app/src/main/java/com/zhenghuiyan/todaything/util/MiscUtil.java
// public class MiscUtil {
//     public static Context appContext = null;
// 
//     private MiscUtil() {}
// 
//     public static void setAppContext(Context c) {
//         appContext = c;
//     }
// 
//     public static Context getAppContext() {
//         return appContext;
//     }
// 
//     /**
//      *
//      * */
// 
//      public static void goToActivity(Activity a, Fragment f, Class<?> b, Bundle bundle, boolean isForResult) {
//         Intent intent = new Intent(a, b);
//         if (bundle != null) {
//             intent.putExtras(bundle);
//         }
//         if (isForResult && (f != null)) {
//             f.startActivityForResult(intent, 0);
//         } else if (isForResult && (f == null)) {
//             a.startActivityForResult(intent, 0);
//         } else {
//             a.startActivity(intent);
//         }
//         a.overridePendingTransition(R.anim.zero_scale_one, R.anim.keep_status);
//     }
// }


// Path: app/src/main/java/com/zhenghuiyan/todaything/data/SPManager.java
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.zhenghuiyan.todaything.util.MiscUtil;

package com.zhenghuiyan.todaything.data;



/**
 * Created by zhenghuiyan on 2015/2/2.
 */
public class SPManager {
    public SharedPreferences mSharedPreferences;

    public static final String LAST_THING_ID_KEY = "last_thing_id";

    public static final String LAST_SYNC_TIME = "last_sync_time";

    private static class SingletonHolder{
        private static final SPManager instance = new SPManager();
    }

    public static SPManager getInstance() {
        return SingletonHolder.instance;
    }

    private SPManager() {
        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(MiscUtil.getAppContext());