|
|
|
@ -13,23 +13,23 @@ object IntentHelp { |
|
|
|
|
|
|
|
|
|
fun toTTSSetting(context: Context) { |
|
|
|
|
//跳转到文字转语音设置界面 |
|
|
|
|
try { |
|
|
|
|
kotlin.runCatching { |
|
|
|
|
val intent = Intent() |
|
|
|
|
intent.action = "com.android.settings.TTS_SETTINGS" |
|
|
|
|
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK |
|
|
|
|
context.startActivity(intent) |
|
|
|
|
} catch (ignored: Exception) { |
|
|
|
|
}.onFailure { |
|
|
|
|
context.toast(R.string.tip_cannot_jump_setting_page) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun toInstallUnknown(context: Context) { |
|
|
|
|
try { |
|
|
|
|
kotlin.runCatching { |
|
|
|
|
val intent = Intent() |
|
|
|
|
intent.action = "android.settings.MANAGE_UNKNOWN_APP_SOURCES" |
|
|
|
|
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK |
|
|
|
|
context.startActivity(intent) |
|
|
|
|
} catch (ignored: Exception) { |
|
|
|
|
}.onFailure { |
|
|
|
|
context.toast("无法打开设置") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|