Commit 944f8819 by 霍志良

Merge remote-tracking branch 'origin/4.1.60' into 4.1.60

parents 918147fd 1ce53d9a
......@@ -37,7 +37,6 @@ ext {
//第二步 若干
"ydl-webview" : "0.0.38.33",
"ydl-webview" : "0.0.38.33",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.13",
"m-audioim" : "0.0.49.29.18",
......
......@@ -608,21 +608,25 @@ class AudioHomeActivity :
private fun requestPermission() {
val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.RECORD_AUDIO).subscribe { permission ->
if (permission.granted) {
writeAgoraLog("请求音频权限通过")
init()
} else if (permission.shouldShowRequestPermissionRationale) {
requestPermission()
} else {
writeAgoraLog("拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
when {
permission.granted -> {
writeAgoraLog("请求音频权限通过")
init()
}
permission.shouldShowRequestPermissionRationale -> {
requestPermission()
}
else -> {
writeAgoraLog("拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
startActivity(intent)
finish()
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", packageName, null)
intent.data = uri
startActivity(intent)
finish()
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment