1.开启Service 华为比小米存活的更长久
2.华为10的程序删除图片,会被系统拦截并提示,小米不会
3. 华为10 会报错 java.lang.RuntimeException: Unable to start activity ComponentInfo{net.topstarts.dev/net.topstarts.MainActivity}: java.lang.SecurityException: Not allowed to change Do Not Disturb state
val audioManager by lazy {
getSystemService(Context.AUDIO_SERVICE) as AudioManager
}
if (audioManager.ringerMode != 2) {
audioManager.ringerMode = 2
}
if (audioManager.getVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION) != AudioManager.VIBRATE_SETTING_ON) {
audioManager.setVibrateSetting(AudioManager.VIBRATE_TYPE_NOTIFICATION, AudioManager.VIBRATE_SETTING_ON)
}
小米不会