We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c01004 commit a51d730Copy full SHA for a51d730
1 file changed
app/src/main/java/com/tool/tree/SplashActivity.kt
@@ -53,6 +53,11 @@ class SplashActivity : AppCompatActivity() {
53
gotoHome()
54
return
55
}
56
+
57
+ if (forceReset) {
58
+ config.beforeStartSh = "" // hoặc mảng rỗng
59
+ ScriptEnvironmen.reset() // nếu có method reset
60
+ }
61
62
// 2. Logic khởi đầu: Nếu chưa đồng ý hoặc thiếu quyền thì hiện Dialog
63
if (hasAgreed() && hasRequiredPermissions()) {
@@ -170,7 +175,7 @@ class SplashActivity : AppCompatActivity() {
170
175
binding.startStateText.text = getString(R.string.pop_started)
171
176
val config = KrScriptConfig().init(this)
172
177
173
- if (config.beforeStartSh.isNotEmpty() || forceReset) {
178
+ if (config.beforeStartSh.isNotEmpty()) {
174
179
runBeforeStartSh(config, hasRoot)
180
} else {
181
0 commit comments