修复部分机型概率性闪退的bug

pull/5/head v2.0.4
fengyuecanzhu 4 years ago
parent c5e78ed129
commit 1a32d43d1c
  1. 5
      app/src/main/assets/updatelog.fy
  2. 19
      app/src/main/java/xyz/fycz/myreader/ui/activity/SplashActivity.java
  3. 4
      app/version_code.properties
  4. 1
      build.gradle

@ -1,3 +1,8 @@
2021.06.01
风月读书v2.0.2
更新内容:
1、修复部分机型概率性启动闪退的问题
2021.05.29 2021.05.29
风月读书v2.0.2 风月读书v2.0.2
更新内容: 更新内容:

@ -57,12 +57,13 @@ public class SplashActivity extends BaseActivity {
private SharedPreUtils spu; private SharedPreUtils spu;
private int todayAdCount; private int todayAdCount;
private int adTimes; private int adTimes;
private boolean hasStart = false;
private PermissionsChecker mPermissionsChecker; private PermissionsChecker mPermissionsChecker;
//创建子线程 //创建子线程
private Thread start = new Thread() { private Runnable start = () -> {
@Override if (!hasStart && !App.isDestroy(SplashActivity.this)) {
public void run() { hasStart = true;
try { try {
Thread.sleep(WAIT_INTERVAL);//使程序休眠 Thread.sleep(WAIT_INTERVAL);//使程序休眠
Intent it = new Intent(SplashActivity.this, MainActivity.class);//启动MainActivity Intent it = new Intent(SplashActivity.this, MainActivity.class);//启动MainActivity
@ -200,21 +201,15 @@ public class SplashActivity extends BaseActivity {
if (BookGroupService.getInstance().curGroupIsPrivate()) { if (BookGroupService.getInstance().curGroupIsPrivate()) {
App.runOnUiThread(() -> { App.runOnUiThread(() -> {
MyAlertDialog.showPrivateVerifyDia(SplashActivity.this, needGoTo -> { MyAlertDialog.showPrivateVerifyDia(SplashActivity.this, needGoTo -> {
if (!start.isAlive()) { (new Thread(start)).start();
start.start();
}
}, () -> { }, () -> {
SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupId), ""); SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupId), "");
SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupName), ""); SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupName), "");
if (!start.isAlive()) { (new Thread(start)).start();
start.start();
}
}); });
}); });
} else { } else {
if (!start.isAlive()) { (new Thread(start)).start();
start.start();
}
} }
} }
} }

@ -1,2 +1,2 @@
#Sat May 29 12:39:33 CST 2021 #Tue Jun 01 08:59:40 CST 2021
VERSION_CODE=202 VERSION_CODE=204

@ -16,6 +16,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0' classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }

Loading…
Cancel
Save