// Path: src/com/zhongyun/viewer/utils/PrefUtils.java
// public class PrefUtils {
// 	
// 	public static final String HAVE_SHOW_GUIDE = "have_show_guide";
// 
// 	public static void putBoolean(Context context, String key, boolean value){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		Editor editor = sp.edit();
// 		editor.putBoolean(key, value);
// 		editor.commit();
// 	}
// 	
// 	public static boolean getBoolean(Context context, String key){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		return sp.getBoolean(key, false);
// 	}
// 	
// 	public static void putString(Context context, String key, String value){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		Editor editor = sp.edit();
// 		editor.putString(key, value);
// 		editor.commit();
// 	}
// 	
// 	public static String getString(Context context, String key){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		return sp.getString(key, "");
// 	}
// }
// 
// Path: src/com/zhongyun/viewer/utils/StringUtils.java
// public class StringUtils {
// 
// 	// Just in case TextUtils.isEmpty() not found on certain system
// 	public static boolean isEmpty(String str){
// 		if(null == str){
// 			return true;
// 		}else if("".equals(str)){
// 			return true;
// 		}
// 		return false;
// 	}
// 	
// 	public static boolean notEmpty(String str) {
//         return (str != null && !str.equals("") && !str.equals("null") && !str.equals("　") && !str.equals(" "));
//     }
// }


import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import com.zhongyun.viewer.utils.PrefUtils;
import com.zhongyun.viewer.utils.StringUtils;
/*
 * Copyright (C) 2015 iChano incorporation's Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.zhongyun.viewer.login;



public class UserInfo {

	public static final String CLIENT_CID = "CLIENT_CID";
	public static final String IS_LOGIN = "IS_LOGIN";
	public static final String USER_NAME = "USER_NAME";
	public static final String USER_SESSION_ID = "USER_SESSION_ID";
	public static final String USER_RECOMMAND_URL = "USER_RECOMMAND_URL";
	public static final String TS = "TS";
	
	private static UserInfo mUserInfo;
	private Context mContext;
	public boolean isLogin;
	public long clientCid = 0;
	public String name;
	public String sessionId;
	public String recommandURL;
	public String ts = "";
	
	private UserInfo(Context context){
		mContext = context;
// Path: src/com/zhongyun/viewer/utils/PrefUtils.java
// public class PrefUtils {
// 	
// 	public static final String HAVE_SHOW_GUIDE = "have_show_guide";
// 
// 	public static void putBoolean(Context context, String key, boolean value){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		Editor editor = sp.edit();
// 		editor.putBoolean(key, value);
// 		editor.commit();
// 	}
// 	
// 	public static boolean getBoolean(Context context, String key){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		return sp.getBoolean(key, false);
// 	}
// 	
// 	public static void putString(Context context, String key, String value){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		Editor editor = sp.edit();
// 		editor.putString(key, value);
// 		editor.commit();
// 	}
// 	
// 	public static String getString(Context context, String key){
// 		SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
// 		return sp.getString(key, "");
// 	}
// }
// 
// Path: src/com/zhongyun/viewer/utils/StringUtils.java
// public class StringUtils {
// 
// 	// Just in case TextUtils.isEmpty() not found on certain system
// 	public static boolean isEmpty(String str){
// 		if(null == str){
// 			return true;
// 		}else if("".equals(str)){
// 			return true;
// 		}
// 		return false;
// 	}
// 	
// 	public static boolean notEmpty(String str) {
//         return (str != null && !str.equals("") && !str.equals("null") && !str.equals("　") && !str.equals(" "));
//     }
// }


// Path: src/com/zhongyun/viewer/login/UserInfo.java
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import com.zhongyun.viewer.utils.PrefUtils;
import com.zhongyun.viewer.utils.StringUtils;

/*
 * Copyright (C) 2015 iChano incorporation's Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.zhongyun.viewer.login;



public class UserInfo {

	public static final String CLIENT_CID = "CLIENT_CID";
	public static final String IS_LOGIN = "IS_LOGIN";
	public static final String USER_NAME = "USER_NAME";
	public static final String USER_SESSION_ID = "USER_SESSION_ID";
	public static final String USER_RECOMMAND_URL = "USER_RECOMMAND_URL";
	public static final String TS = "TS";
	
	private static UserInfo mUserInfo;
	private Context mContext;
	public boolean isLogin;
	public long clientCid = 0;
	public String name;
	public String sessionId;
	public String recommandURL;
	public String ts = "";
	
	private UserInfo(Context context){
		mContext = context;
		String str = PrefUtils.getString(mContext, CLIENT_CID);