This repository was archived by the owner on Oct 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +18
-9
lines changed
java/io/github/mzdluo123/mirai/android/service Expand file tree Collapse file tree 7 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 10
10
<uses-permission android : name =" android.permission.WAKE_LOCK" />
11
11
<uses-permission android : name =" android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
12
12
<uses-permission android : name =" android.permission.REQUEST_DELETE_PACKAGES" />
13
+ <uses-permission
14
+ android : name =" android.permission.QUERY_ALL_PACKAGES"
15
+ tools : ignore =" QueryAllPackagesPermission" />
16
+
17
+ <queries >
18
+ <intent >
19
+ <action android : name =" android.intent.action.SEND" />
20
+ </intent >
21
+ </queries >
13
22
14
23
<application
15
24
android : name =" .BotApplication"
Original file line number Diff line number Diff line change @@ -65,13 +65,6 @@ class BotService : LifecycleService() {
65
65
// Debug.waitForDebugger()
66
66
// }
67
67
68
- init {
69
- if (AppSettings .waitingDebugger) {
70
- MiraiAndroidLogger .info(" 等待调试器链接..... PID:${android.os.Process .myPid()} " )
71
- Debug .waitForDebugger()
72
- }
73
-
74
- }
75
68
76
69
companion object {
77
70
const val START_SERVICE = 0
@@ -116,6 +109,12 @@ class BotService : LifecycleService() {
116
109
override fun onCreate () {
117
110
super .onCreate()
118
111
consoleFrontEnd = AndroidMiraiConsole (baseContext, getExternalFilesDir(" " )!! .toPath())
112
+
113
+ if (AppSettings .waitingDebugger) {
114
+ MiraiAndroidLogger .info(" 等待调试器链接..... PID:${android.os.Process .myPid()} " )
115
+ Debug .waitForDebugger()
116
+ }
117
+
119
118
// powerManager = getSystemService(Context.POWER_SERVICE) as PowerManager
120
119
// wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "BotWakeLock")
121
120
}
@@ -175,7 +174,7 @@ class BotService : LifecycleService() {
175
174
// consoleVersion = BuildConfig.COREVERSION,
176
175
// path = getExternalFilesDir(null).toString()
177
176
// )
178
-
177
+
179
178
LuaMiraiPlugin .load()
180
179
LuaMiraiPlugin .enable()
181
180
Original file line number Diff line number Diff line change 10
10
android : id =" @+id/textView16"
11
11
android : layout_width =" wrap_content"
12
12
android : layout_height =" wrap_content"
13
- android : text =" 敬请期待"
13
+ android : text =" MiraiAndroid已内置lua插件,请在控制台内操作"
14
+ android : textSize =" 18sp"
14
15
app : layout_constraintBottom_toBottomOf =" parent"
15
16
app : layout_constraintEnd_toEndOf =" parent"
16
17
app : layout_constraintStart_toStartOf =" parent"
You can’t perform that action at this time.
0 commit comments