Commit 944f8819 by 霍志良

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

parents 918147fd 1ce53d9a
...@@ -37,7 +37,6 @@ ext { ...@@ -37,7 +37,6 @@ ext {
//第二步 若干 //第二步 若干
"ydl-webview" : "0.0.38.33", "ydl-webview" : "0.0.38.33",
"ydl-webview" : "0.0.38.33",
"ydl-media" : "0.0.21.6", "ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.13", "ydl-pay" : "0.0.18.13",
"m-audioim" : "0.0.49.29.18", "m-audioim" : "0.0.49.29.18",
......
...@@ -608,21 +608,25 @@ class AudioHomeActivity : ...@@ -608,21 +608,25 @@ class AudioHomeActivity :
private fun requestPermission() { private fun requestPermission() {
val rxPermissions = RxPermissions(this) val rxPermissions = RxPermissions(this)
rxPermissions.requestEach(Manifest.permission.RECORD_AUDIO).subscribe { permission -> rxPermissions.requestEach(Manifest.permission.RECORD_AUDIO).subscribe { permission ->
if (permission.granted) { when {
writeAgoraLog("请求音频权限通过") permission.granted -> {
init() writeAgoraLog("请求音频权限通过")
} else if (permission.shouldShowRequestPermissionRationale) { init()
requestPermission() }
} else { permission.shouldShowRequestPermissionRationale -> {
writeAgoraLog("拒绝请求音频权限") requestPermission()
uploadLog() }
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint)) else -> {
writeAgoraLog("拒绝请求音频权限")
uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
val uri = Uri.fromParts("package", packageName, null) val uri = Uri.fromParts("package", packageName, null)
intent.data = uri intent.data = uri
startActivity(intent) startActivity(intent)
finish() 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