Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
1ce53d9a
Commit
1ce53d9a
authored
Nov 03, 2020
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:代码优化
parent
41ac8ce0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
15 deletions
+18
-15
config.gradle
config.gradle
+0
-1
AudioHomeActivity.kt
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
+18
-14
No files found.
config.gradle
View file @
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"
,
...
...
m-audioim/src/main/java/com/ydl/audioim/AudioHomeActivity.kt
View file @
1ce53d9a
...
...
@@ -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
()
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment