Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
修复部分机型概率性闪退的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuecanzhu committed Jun 1, 2021
1 parent c5e78ed commit 1a32d43
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
5 changes: 5 additions & 0 deletions app/src/main/assets/updatelog.fy
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2021.06.01
风月读书v2.0.2
更新内容:
1、修复部分机型概率性启动闪退的问题

2021.05.29
风月读书v2.0.2
更新内容:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ public class SplashActivity extends BaseActivity {
private SharedPreUtils spu;
private int todayAdCount;
private int adTimes;
private boolean hasStart = false;

private PermissionsChecker mPermissionsChecker;
//创建子线程
private Thread start = new Thread() {
@Override
public void run() {
private Runnable start = () -> {
if (!hasStart && !App.isDestroy(SplashActivity.this)) {
hasStart = true;
try {
Thread.sleep(WAIT_INTERVAL);//使程序休眠
Intent it = new Intent(SplashActivity.this, MainActivity.class);//启动MainActivity
Expand Down Expand Up @@ -200,21 +201,15 @@ private void startNormal() {
if (BookGroupService.getInstance().curGroupIsPrivate()) {
App.runOnUiThread(() -> {
MyAlertDialog.showPrivateVerifyDia(SplashActivity.this, needGoTo -> {
if (!start.isAlive()) {
start.start();
}
(new Thread(start)).start();
}, () -> {
SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupId), "");
SharedPreUtils.getInstance().putString(SplashActivity.this.getString(R.string.curBookGroupName), "");
if (!start.isAlive()) {
start.start();
}
(new Thread(start)).start();
});
});
} else {
if (!start.isAlive()) {
start.start();
}
(new Thread(start)).start();
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/version_code.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#Sat May 29 12:39:33 CST 2021
VERSION_CODE=202
#Tue Jun 01 08:59:40 CST 2021
VERSION_CODE=204
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'org.greenrobot:greendao-gradle-plugin:3.3.0'
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
// in the individual module build.gradle files
}
Expand Down

0 comments on commit 1a32d43

Please sign in to comment.