Skip to content

Commit a51d730

Browse files
committed
Update
1 parent 8c01004 commit a51d730

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class SplashActivity : AppCompatActivity() {
5353
gotoHome()
5454
return
5555
}
56+
57+
if (forceReset) {
58+
config.beforeStartSh = "" // hoặc mảng rỗng
59+
ScriptEnvironmen.reset() // nếu có method reset
60+
}
5661

5762
// 2. Logic khởi đầu: Nếu chưa đồng ý hoặc thiếu quyền thì hiện Dialog
5863
if (hasAgreed() && hasRequiredPermissions()) {
@@ -170,7 +175,7 @@ class SplashActivity : AppCompatActivity() {
170175
binding.startStateText.text = getString(R.string.pop_started)
171176
val config = KrScriptConfig().init(this)
172177

173-
if (config.beforeStartSh.isNotEmpty() || forceReset) {
178+
if (config.beforeStartSh.isNotEmpty()) {
174179
runBeforeStartSh(config, hasRoot)
175180
} else {
176181
gotoHome()

0 commit comments

Comments
 (0)