新增 未激活状态强制对话框

This commit is contained in:
LittleTurtle2333
2022-02-18 15:31:15 +08:00
parent a62b32a5cc
commit c8dcc9b309
2 changed files with 7 additions and 1 deletions

View File

@@ -11,7 +11,8 @@
android:theme="@style/Theme.MyApplication"> android:theme="@style/Theme.MyApplication">
<activity <activity
android:name=".activity.SettingsActivity" android:name=".activity.SettingsActivity"
android:exported="true"> android:exported="true"
android:launchMode="singleTop">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>

View File

@@ -43,7 +43,12 @@ class SettingsActivity : AppCompatActivity() {
} catch (exception: SecurityException) { } catch (exception: SecurityException) {
AlertDialog.Builder(this) AlertDialog.Builder(this)
.setMessage("您似乎正在使用过时的 LSPosed 版本或 LSPosed 未激活,请更新 LSPosed 或者激活后再试。") .setMessage("您似乎正在使用过时的 LSPosed 版本或 LSPosed 未激活,请更新 LSPosed 或者激活后再试。")
.setCancelable(false)
.setPositiveButton("确定", DialogInterface.OnClickListener { dialogInterface, i ->
android.os.Process.killProcess(android.os.Process.myPid())
})
.show() .show()
} }
} }