- DatabaseBootstrapper: 删除 Gitee 分片/manifest/blob 下载逻辑, 曲库只走官方 MuseDbSync - build.gradle: 移除 GITEE_DATABASE_* 构建参数 - MainActivity: 重置数据库文案改为官方同步 - ktv_api.js: 歌曲源仅 w.w345.my, 缓存标记 7, 广告/错号资源拦截+重试 - 远程日志: 点歌记录 编号/标题/请求源/状态
23 lines
673 B
Kotlin
23 lines
673 B
Kotlin
package com.local.ktv
|
|
|
|
import android.content.BroadcastReceiver
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import android.util.Log
|
|
|
|
class BootReceiver : BroadcastReceiver() {
|
|
override fun onReceive(context: Context, intent: Intent?) {
|
|
if (intent?.action != Intent.ACTION_BOOT_COMPLETED) return
|
|
runCatching {
|
|
context.startActivity(
|
|
Intent(context, MainActivity::class.java)
|
|
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
|
)
|
|
}.onFailure { Log.e(TAG, "Unable to launch KTV after boot", it) }
|
|
}
|
|
|
|
private companion object {
|
|
const val TAG = "BootReceiver"
|
|
}
|
|
}
|