修改了默认的设置内容提供者的地址.
authorTrillGates <WilliamTrillGates@gmail.com>
Fri, 22 Apr 2022 06:59:50 +0000 (14:59 +0800)
committerTrillGates <WilliamTrillGates@gmail.com>
Fri, 22 Apr 2022 06:59:50 +0000 (14:59 +0800)
13 files changed:
.idea/gradle.xml
app/release/ICLoopPageLauncher_V57_202204221431_release.apk [moved from app/release/ICLoopPageLauncher_V52_202110291418_release.apk with 53% similarity]
app/release/output-metadata.json
app/src/main/java/com/ic/launcher/NotificationActivity.java
app/src/main/java/com/ic/launcher/presenter/MainPagePresenter.java
app/src/main/java/com/ic/launcher/utils/Constants.java
app/src/main/java/com/ic/launcher/view/MarqueeView.java
app/src/main/res/values-en/strings.xml
app/src/main/res/values-ja/strings.xml
app/src/main/res/values-night/strings.xml [deleted file]
app/src/main/res/values-zh-rCN/strings.xml
app/src/main/res/values/strings.xml
app/version_code.properties

index 23a89bb..2c7e034 100644 (file)
@@ -4,7 +4,7 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
-        <option name="testRunner" value="PLATFORM" />
+        <option name="testRunner" value="GRADLE" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
         <option name="gradleJvm" value="1.8" />
@@ -15,7 +15,6 @@
           </set>
         </option>
         <option name="resolveModulePerSourceSet" value="false" />
-        <option name="useQualifiedModuleNames" value="true" />
       </GradleProjectSettings>
     </option>
   </component>
similarity index 53%
rename from app/release/ICLoopPageLauncher_V52_202110291418_release.apk
rename to app/release/ICLoopPageLauncher_V57_202204221431_release.apk
index 733d8d6..bd2be8a 100644 (file)
Binary files a/app/release/ICLoopPageLauncher_V52_202110291418_release.apk and b/app/release/ICLoopPageLauncher_V57_202204221431_release.apk differ
index 9593ce0..8d6202c 100644 (file)
@@ -12,7 +12,7 @@
       "filters": [],
       "versionCode": 1,
       "versionName": "1.0",
-      "outputFile": "ICLoopPageLauncher_V52_202110291418_release.apk"
+      "outputFile": "ICLoopPageLauncher_V57_202204221431_release.apk"
     }
   ]
 }
\ No newline at end of file
index 17a2b47..de0b678 100644 (file)
@@ -91,7 +91,11 @@ public class NotificationActivity extends AppCompatActivity {
         itemView.setTag(category);
         String type = notificationItem.getType();
         itemView.setOnClickListener(item -> {
-            handleItemClick(category, notificationItem);
+            try {
+                handleItemClick(category, notificationItem);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         });
         //处理头像
         int iconRes = getIconRes(type);
index f7dc507..cfa5199 100644 (file)
@@ -1,5 +1,8 @@
 package com.ic.launcher.presenter;
 
+import static com.ic.launcher.utils.Constants.NOTIFICATIONS;
+import static com.ic.launcher.utils.Constants.SETTINGS;
+
 import android.app.ActivityManager;
 import android.content.BroadcastReceiver;
 import android.content.ContentValues;
@@ -18,6 +21,7 @@ import com.ic.iclooger.ICLogger;
 import com.ic.launcher.NotificationActivity;
 import com.ic.launcher.R;
 import com.ic.launcher.utils.Constants;
+import com.ic.launcher.utils.SystemUtils;
 
 import org.threeten.bp.Instant;
 import org.threeten.bp.LocalDateTime;
@@ -29,9 +33,6 @@ import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import static com.ic.launcher.utils.Constants.NOTIFICATIONS;
-import static com.ic.launcher.utils.Constants.SETTINGS;
-
 
 public class MainPagePresenter extends BasePresenter {
 
@@ -118,6 +119,15 @@ public class MainPagePresenter extends BasePresenter {
     public void checkNotification() {
         //如果是关闭的,有多少删除多少
         executor.execute(() -> {
+            String customName = SystemUtils.getSystemProperties("persist.sys.customname");
+            if (!"VitracK".equals(customName)) {
+                try {
+                    doNotificationDelete();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                return;
+            }
             String notificationValue = getValue(KEY_NOTIFICATION_ENABLE);
             ICLogger.d("notificationValue ==> " + notificationValue);
             if (notificationValue == null || "1".equals(notificationValue)) {
@@ -134,26 +144,30 @@ public class MainPagePresenter extends BasePresenter {
                     query.close();
                 }
             } else {
-                int delete = mContext.getContentResolver().delete(Uri.parse(NOTIFICATIONS), null, null);
-                ICLogger.d("notification delete count => " + delete);
-                //干掉顶部的通知
-                ContentValues contentValues = new ContentValues();
-                //分类是心率的包名
-                contentValues.put("s_key", "has_missed_phone");
-                //1表示有,0表示没有
-                contentValues.put("s_value", 0);
-                mContext.getContentResolver().insert(Uri.parse(Constants.SETTINGS), contentValues);
-
-                ContentValues smsContentValues = new ContentValues();
-                //分类是心率的包名
-                smsContentValues.put("s_key", "sms_unread");
-                //1表示有,0表示没有
-                smsContentValues.put("s_value", 0);
-                mContext.getContentResolver().insert(Uri.parse(Constants.SETTINGS), contentValues);
+                doNotificationDelete();
             }
         });
     }
 
+    private void doNotificationDelete() {
+        int delete = mContext.getContentResolver().delete(Uri.parse(NOTIFICATIONS), null, null);
+        ICLogger.d("notification delete count => " + delete);
+        //干掉顶部的通知
+        ContentValues contentValues = new ContentValues();
+        //分类是心率的包名
+        contentValues.put("s_key", "has_missed_phone");
+        //1表示有,0表示没有
+        contentValues.put("s_value", 0);
+        mContext.getContentResolver().insert(Uri.parse(Constants.SETTINGS), contentValues);
+
+        ContentValues smsContentValues = new ContentValues();
+        //分类是心率的包名
+        smsContentValues.put("s_key", "sms_unread");
+        //1表示有,0表示没有
+        smsContentValues.put("s_value", 0);
+        mContext.getContentResolver().insert(Uri.parse(Constants.SETTINGS), contentValues);
+    }
+
 
     private String getValue(String key) {
         Cursor query = mContext.getContentResolver()
@@ -294,7 +308,7 @@ public class MainPagePresenter extends BasePresenter {
                 true, new ContentObserver(null) {
                     @Override
                     public void onChange(boolean selfChange) {
-                        //更新血压
+                        //更新步数
                         getStepCount();
                     }
                 });
index 9248ef3..84676ab 100644 (file)
@@ -2,7 +2,7 @@ package com.ic.launcher.utils;
 
 public class Constants {
     public static final String PATH = "settings";
-    public static final String AUTHORITY = "com.ic.protocolSrv";
+    public static final String AUTHORITY = "com.ic.fzd.settings";
     public static final String SETTINGS = "content://" + AUTHORITY + "/" + PATH;
     public static final String LAUNCHER_APP_LIST_STYLE = "launcher_app_list_style";
     public static final String BRIGHTNESS_VALUE = "brightness_value";
index a239566..8d2a2ba 100644 (file)
@@ -61,7 +61,7 @@ public class MarqueeView extends ViewGroup {
             //设置孩子的位置,从0开始
             int measuredHeight = item.getMeasuredHeight();
             int top = heightSize / 2 - measuredHeight / 2;
-            ICLogger.d("measuredHeight  == > " + measuredHeight);
+            //ICLogger.d("measuredHeight  == > " + measuredHeight);
             item.setTag(new Position(totalWidth,
                     top,
                     totalWidth + item.getMeasuredWidth(),
index fff8e27..e0def32 100644 (file)
@@ -24,6 +24,7 @@
     <string name="no_sim_car">no sim</string>
     <string name="no_sim_service">no service</string>
     <string name="no_application_tips_text">no such app</string>
-    <string name="checking_sim_text_tips">检测sim卡</string>
-    <string name="ai_voice_text">AI语助</string>
+    <string name="checking_sim_text_tips">check sim</string>
+    <string name="ai_voice_text">AI</string>
+    <string name="qr_code_text">QrCode</string>
 </resources>
\ No newline at end of file
index 15edbc4..8e5d5f3 100644 (file)
@@ -26,4 +26,5 @@
     <string name="no_application_tips_text">应用未装着</string>
     <string name="checking_sim_text_tips">检测sim卡</string>
     <string name="ai_voice_text">AI语助</string>
+    <string name="qr_code_text">二维码</string>
 </resources>
\ No newline at end of file
diff --git a/app/src/main/res/values-night/strings.xml b/app/src/main/res/values-night/strings.xml
deleted file mode 100644 (file)
index 9f09dca..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <string name="checking_sim_text_tips">检测sim卡</string>
-    <string name="ai_voice_text">AI语助</string>
-</resources>
\ No newline at end of file
index 33db44f..eb08fba 100644 (file)
@@ -29,5 +29,6 @@
     <string name="no_sim_service">没有服务</string>
     <string name="checking_sim_text_tips">检测sim卡</string>
     <string name="ai_voice_text">AI语助</string>
+    <string name="qr_code_text">二维码</string>
 
 </resources>
\ No newline at end of file
index 5df584e..86f3f01 100644 (file)
@@ -24,8 +24,8 @@
     <string name="app_package_name_ic_talk" translatable="false">com.ic.wetalk</string>
     <string name="app_package_name_contact" translatable="false">com.ic.contact</string>
     <string name="app_package_name_qr_code" translatable="false">com.ic.qrc</string>
-    <string name="app_package_name_camera" translatable="false">com.ic.camera</string>
-    <string name="app_package_name_photo" translatable="false">com.ic.album</string>
+    <string name="app_package_name_camera" translatable="false">com.android.camera2</string>
+    <string name="app_package_name_photo" translatable="false">com.android.gallery3d</string>
     <string name="app_package_name_sms" translatable="false">com.ic.mms</string>
     <string name="app_package_name_record" translatable="false">com.ic.record</string>
     <string name="app_package_name_sign" translatable="false">com.ic.signin</string>
index a49531e..a4c660c 100644 (file)
@@ -1,2 +1,2 @@
-#Fri Oct 29 14:18:55 CST 2021
-VERSION_CODE=52
+#Fri Apr 22 14:31:24 CST 2022
+VERSION_CODE=57