release icaklauncher V1.5.0
authorsnickersun <scy@incartech.cn>
Mon, 4 Jan 2021 03:30:07 +0000 (11:30 +0800)
committersnickersun <scy@incartech.cn>
Mon, 4 Jan 2021 03:30:07 +0000 (11:30 +0800)
确认所有productType都用AppConfig的。
初始化ICLogger,解决launcher运行crash问题。

13 files changed:
.idea/.name [new file with mode: 0644]
.idea/compiler.xml [new file with mode: 0644]
.idea/gradle.xml
.idea/misc.xml
.idea/vcs.xml
app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101041103_release.apk [moved from app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101031149_release.apk with 56% similarity]
app/IcAkLauncher/release/output-metadata.json
app/src/main/java/com/ic/ak/launcher/LauncherApp.java
app/src/main/java/com/ic/ak/launcher/data/battery/BatteryDispose.java
app/src/main/java/com/ic/ak/launcher/data/hardware/HardwareDispose.java
app/src/main/java/com/ic/ak/launcher/ui/MainActivity.java
app/src/main/java/com/ic/ak/launcher/util/StorageUtils.java
gradle/wrapper/gradle-wrapper.properties

diff --git a/.idea/.name b/.idea/.name
new file mode 100644 (file)
index 0000000..5c89a1f
--- /dev/null
@@ -0,0 +1 @@
+IcAkLauncher
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644 (file)
index 0000000..61a9130
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <bytecodeTargetLevel target="1.8" />
+  </component>
+</project>
\ No newline at end of file
index 22ffc66..9bba60d 100644 (file)
@@ -7,7 +7,6 @@
         <option name="testRunner" value="PLATFORM" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
-        <option name="gradleJvm" value="1.8 (2)" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
index 0eebcd7..9f83622 100644 (file)
@@ -6,7 +6,7 @@
     <option name="priority" value="Medium" />
     <option name="excludeFilter" value="" />
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">
index 55464d7..35eb1dd 100644 (file)
@@ -1,14 +1,6 @@
-<<<<<<< HEAD
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="" vcs="Git" />
   </component>
-=======
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
->>>>>>> origin/master
 </project>
\ No newline at end of file
similarity index 56%
rename from app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101031149_release.apk
rename to app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101041103_release.apk
index 70cf7c6..aec085c 100644 (file)
Binary files a/app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101031149_release.apk and b/app/IcAkLauncher/release/IcAkLauncher_V1_5.0_202101041103_release.apk differ
index e52688d..cc8dbf6 100644 (file)
@@ -12,7 +12,7 @@
       "filters": [],
       "versionCode": 1,
       "versionName": "5.0",
-      "outputFile": "IcAkLauncher_V1_5.0_202101031149_release.apk"
+      "outputFile": "IcAkLauncher_V1_5.0_202101041103_release.apk"
     }
   ]
 }
\ No newline at end of file
index bc7c011..785b279 100644 (file)
@@ -11,6 +11,7 @@ import com.ic.ak.launcher.data.hardware.HardwareDispose;
 import com.ic.ak.launcher.data.phone.PhoneDispose;
 import com.ic.ak.launcher.data.time.TimeDispose;
 import com.ic.ak.launcher.util.CrashHandler;
+import com.ic.ak.launcher.util.ICLogger;
 import com.ic.ak.launcher.util.IcLog;
 import com.jakewharton.threetenabp.AndroidThreeTen;
 
@@ -30,6 +31,7 @@ public class LauncherApp extends Application {
     @Override
     public void onCreate() {
         super.onCreate();
+        ICLogger.setContext(this);
         CrashHandler crashHandler = CrashHandler.getInstance();
         crashHandler.init(getApplicationContext());
 
index c84b481..13d2287 100644 (file)
@@ -13,6 +13,7 @@ import androidx.lifecycle.MutableLiveData;
 
 import com.ic.ak.launcher.BuildConfig;
 import com.ic.ak.launcher.R;
+import com.ic.ak.launcher.data.app.AppConfig;
 import com.ic.ak.launcher.data.play.PlaySoundEvent;
 import com.ic.ak.launcher.ui.dialog.ShowDialogEvent;
 
@@ -157,7 +158,7 @@ public class BatteryDispose {
     }
 
     public static int[] getCurrentProductBatteryResId(){
-        int product = BuildConfig.productType;
+        int product = AppConfig.productType;
         switch (product){
             case 1001:
                 return AKBatteryResId;
index 42b4788..a1c83f0 100644 (file)
@@ -9,11 +9,7 @@ import android.text.TextUtils;
 
 import androidx.lifecycle.MediatorLiveData;
 import androidx.lifecycle.MutableLiveData;
-
-import com.ic.ak.launcher.BuildConfig;
-import com.ic.ak.launcher.data.play.PlaySoundEvent;
-import com.ic.ak.launcher.data.play.SoundPlayUtils;
-import com.ic.ak.launcher.ui.dialog.AlertDialogManage;
+import com.ic.ak.launcher.data.app.AppConfig;
 import com.ic.ak.launcher.ui.dialog.ShowDialogEvent;
 import com.ic.ak.launcher.util.IcLog;
 
@@ -81,7 +77,7 @@ public class HardwareDispose {
         filter.addAction(POWER_OFF_ACTION);
         filter.addAction(SOS_ACTION);
         filter.addAction(TXT_ACTION);
-        int product = BuildConfig.productType;
+        int product = AppConfig.productType;
         if (product == 1001) {
             filter.addAction(ACTION_KEEPSIT_ALARM);
         }
index acc08da..22cb08a 100644 (file)
@@ -14,9 +14,9 @@ import android.provider.Settings;
 import android.view.KeyEvent;
 import android.view.View;
 
-import com.ic.ak.launcher.BuildConfig;
 import com.ic.ak.launcher.LauncherApp;
 import com.ic.ak.launcher.R;
+import com.ic.ak.launcher.data.app.AppConfig;
 import com.ic.ak.launcher.data.hardware.HardwareDispose;
 import com.ic.ak.launcher.data.play.PlaySoundEvent;
 import com.ic.ak.launcher.data.play.SoundPlayUtils;
@@ -56,9 +56,9 @@ public class MainActivity extends AppCompatActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        if (BuildConfig.productType == 1002) {
+        if (AppConfig.productType == 1002) {
             setContentView(R.layout.activity_a9_main);
-        } else if (BuildConfig.productType == 1001) {
+        } else if (AppConfig.productType == 1001) {
             setContentView(R.layout.activity_main);
         }
 
@@ -140,20 +140,20 @@ public class MainActivity extends AppCompatActivity {
                 dialogManage.showSlipLowDialog(this);
                 break;
             case 1001:
-                if (BuildConfig.productType == 1002) {
+                if (AppConfig.productType == 1002) {
                     dialogManage.showTextDialog(this,event.message);
-                }else if(BuildConfig.productType == 1001){
+                }else if(AppConfig.productType == 1001){
                     dialogManage.showNotificationDialog(this,this,event.type,event.message);
                 }
                 break;
             case 1007:
-                if (BuildConfig.productType == 1002) {
+                if (AppConfig.productType == 1002) {
                     dialogManage.showTextDialog(this,event.message);
                     soundPlayUtils.playKeyboardSound(this, 16);
                 }
                 break;
             case 1002:
-                if (BuildConfig.productType == 1001) {
+                if (AppConfig.productType == 1001) {
                     dialogManage.showSedentaryDialog(this,this);
                 }
                 break;
@@ -192,7 +192,7 @@ public class MainActivity extends AppCompatActivity {
                 indicatorAdapter.updateIndicatorState(index);
             }
 
-            if (BuildConfig.productType == 1001) {
+            if (AppConfig.productType == 1001) {
                 int playId = mApp.getAppDispose().getAppItemPlayItem(position);
                 if (playId != -1) {
                     if(launchername.equals("ak")) {
index d291d14..0b469fe 100644 (file)
@@ -44,7 +44,7 @@ public final class StorageUtils {
 
        public static String getExternalStorageLogDir(Context context) {
 
-               if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+               if (context!=null && Environment.getExternalStorageState()!=null && Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
                        File dir = new File(Environment.getExternalStorageDirectory().getPath(), "Android/ic/"+ context.getApplicationInfo().packageName);
                        String path = dir.getPath();
                        if (!dir.exists()) {
index 698857a..a2455cf 100644 (file)
@@ -1,6 +1,6 @@
-#Tue Jun 30 11:40:42 CST 2020
+#Fri Nov 06 20:44:42 CST 2020
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip