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,12 +608,15 @@ class AudioHomeActivity : ...@@ -608,12 +608,15 @@ 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 {
permission.granted -> {
writeAgoraLog("请求音频权限通过") writeAgoraLog("请求音频权限通过")
init() init()
} else if (permission.shouldShowRequestPermissionRationale) { }
permission.shouldShowRequestPermissionRationale -> {
requestPermission() requestPermission()
} else { }
else -> {
writeAgoraLog("拒绝请求音频权限") writeAgoraLog("拒绝请求音频权限")
uploadLog() uploadLog()
ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint)) ToastHelper.show(getString(R.string.audioim_need_storage_permission_hint))
...@@ -626,6 +629,7 @@ class AudioHomeActivity : ...@@ -626,6 +629,7 @@ class AudioHomeActivity :
} }
} }
} }
}
@SuppressLint("CheckResult", "SetTextI18n") @SuppressLint("CheckResult", "SetTextI18n")
private fun init() { private fun init() {
......
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