From 3a154bdb0a5aaa2c0ac3eac95a6ba747068bd454 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 13 一月 2026 10:00:37 +0800
Subject: [PATCH] 优化
---
keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/BraceletLogUtils.java | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/BraceletLogUtils.java b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/BraceletLogUtils.java
new file mode 100644
index 0000000..070bf0a
--- /dev/null
+++ b/keyCabinet-android/app/src/main/java/com/doumee/keyCabinet/utils/BraceletLogUtils.java
@@ -0,0 +1,50 @@
+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);
+ }
+}
--
Gitblit v1.9.3