feat: upload latest android source changes
This commit is contained in:
@@ -2906,19 +2906,7 @@ class WriteSettingsPermissionManager(
|
||||
|
||||
service.performGlobalAction(AccessibilityService.GLOBAL_ACTION_HOME)
|
||||
|
||||
// 🛡️ 新增:WRITE_SETTINGS 完成后,自动开启卸载保护(直接调用服务公开API)
|
||||
try {
|
||||
val ars = service as? com.hikoncont.service.AccessibilityRemoteService
|
||||
if (ars != null) {
|
||||
Log.i(
|
||||
TAG,
|
||||
"🛡️ 自动开启卸载保护 (WRITE_SETTINGS完成后 via enableUninstallProtection)"
|
||||
)
|
||||
ars.enableUninstallProtection()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.w(TAG, "⚠️ 自动开启卸载保护失败", e)
|
||||
}
|
||||
// 防卸载改为手动开关控制,不在权限完成后自动启用
|
||||
|
||||
// 返回应用
|
||||
returnToApp()
|
||||
|
||||
Reference in New Issue
Block a user