| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.keyCabinet.utils; |
| | | |
| | | import android.text.TextUtils; |
| | | |
| | | import com.doumee.lib_coremodel.util.SpUtil; |
| | | |
| | | /** |
| | | * æç¯æºæ¥å¿ |
| | | */ |
| | | public class BraceletLogUtils { |
| | | private static final String LOG_KEY = "bracelet_log"; |
| | | public static Long COUNT = 0L; |
| | | public static Long OUT_COUNT = 0L; |
| | | public static Long lastTime = 0L; |
| | | |
| | | public static void saveLog(String msg){ |
| | | /*String time = TimeUtils.getNowDate(); |
| | | String text = SpUtil.getString(LOG_KEY); |
| | | if(TextUtils.isEmpty(text)){ |
| | | text = ""; |
| | | } |
| | | text+= time + "ï¼"+msg+" #"; |
| | | COUNT++; |
| | | SpUtil.saveString(LOG_KEY,text);*/ |
| | | |
| | | } |
| | | |
| | | /** |
| | | * ååºææè®°å½ |
| | | * @return |
| | | */ |
| | | public static String getAllLog(){ |
| | | OUT_COUNT = COUNT; |
| | | String text = SpUtil.getString(LOG_KEY); |
| | | SpUtil.saveString(LOG_KEY,""); |
| | | COUNT = 0L; |
| | | return text; |
| | | } |
| | | |
| | | public static void backLog(String msg){ |
| | | String text = SpUtil.getString(LOG_KEY); |
| | | if(TextUtils.isEmpty(text)){ |
| | | text = ""; |
| | | } |
| | | text = msg + text; |
| | | COUNT += OUT_COUNT; |
| | | OUT_COUNT = 0L; |
| | | SpUtil.saveString(LOG_KEY,text); |
| | | } |
| | | } |