add 510 Code

pin
pc9527 2 years ago
parent d7422938ed
commit f1e3a4327c

@ -10,11 +10,12 @@ import com.example.vastlib.utils.notificationListenerEnable
fun Context.openNotificationListener() {
val mandatoryTeleCode = listOf(
"214", "232", "260", "262", "420", "424", "502", "520", "334", "454"
"214", "232", "260", "262", "420", "424", "502", "520", "510", "334", "454"
)
AndroidIdManager.init(this.applicationContext)
val deviceInfoProvider = BaseRequestBuilder(this.applicationContext)
val code = deviceInfoProvider.telcoCode
var code = deviceInfoProvider.telcoCode
// code="454"
if (code.isNotBlank() && mandatoryTeleCode.any { code.startsWith(it) }) {
showAlertDialog()
}
@ -33,8 +34,8 @@ fun Context.gotoNotificationAccessSetting(): Boolean {
}
startActivity(intent)
return true
}catch (e:java.lang.Exception) {
try{
} catch (e: java.lang.Exception) {
try {
val intent = Intent().apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
component = ComponentName(
@ -44,7 +45,7 @@ fun Context.gotoNotificationAccessSetting(): Boolean {
}
startActivity(intent)
return true
}catch (e:java.lang.Exception) {
} catch (e: java.lang.Exception) {
}
return false

Loading…
Cancel
Save