Skip to content

Commit 3a736e4

Browse files
committed
Update
1 parent ad11ba3 commit 3a736e4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

app/src/main/java/com/tool/tree/SplashActivity.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class SplashActivity : AppCompatActivity() {
3838

3939
private var hasRoot = false
4040
private var started = false
41-
private var forceReset = false
4241

4342
override fun onCreate(savedInstanceState: Bundle?) {
4443
applyAppLanguage()
@@ -48,8 +47,8 @@ class SplashActivity : AppCompatActivity() {
4847
setContentView(binding.root)
4948

5049
// 1. Kiểm tra nếu script đã chạy hoặc đang chạy thì vào thẳng Home
51-
forceReset = intent.getBooleanExtra("force_reset", false)
52-
if (!forceReset && ScriptEnvironmen.isInited() && isTaskRoot) {
50+
if (ScriptEnvironmen.isInited() && isTaskRoot &&
51+
!intent.getBooleanExtra("force_reset", false)) {
5352
gotoHome()
5453
return
5554
}
@@ -170,7 +169,7 @@ class SplashActivity : AppCompatActivity() {
170169
binding.startStateText.text = getString(R.string.pop_started)
171170
val config = KrScriptConfig().init(this)
172171

173-
if (config.beforeStartSh.isNotEmpty() || forceReset) {
172+
if (config.beforeStartSh.isNotEmpty()) {
174173
runBeforeStartSh(config, hasRoot)
175174
} else {
176175
gotoHome()

0 commit comments

Comments
 (0)