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
5e9cb2bd
Commit
5e9cb2bd
authored
Aug 29, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限拒绝弹窗修改
parent
735e336b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
11 deletions
+32
-11
IAudioImService.kt
api/audioim/src/main/java/com/ydl/audioim/api/IAudioImService.kt
+2
-0
AudioImServiceImp.kt
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
+13
-0
AxbConfirmDialog.kt
m-audioim/src/main/java/com/ydl/audioim/widget/AxbConfirmDialog.kt
+6
-2
audioim_dialog_autoaxb_confirm.xml
m-audioim/src/main/res/layout/audioim_dialog_autoaxb_confirm.xml
+1
-1
ConfidePermissionDialog.kt
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
+10
-8
No files found.
api/audioim/src/main/java/com/ydl/audioim/api/IAudioImService.kt
View file @
5e9cb2bd
...
...
@@ -35,6 +35,8 @@ interface IAudioImService : IProvider{
*/
fun
openAxbDialog
(
activity
:
Activity
?,
type
:
Int
,
phoneNumber
:
String
?)
fun
openPermissionRejectDialog
(
activity
:
Activity
?,
callback
:
(()
->
Unit
))
/**
* 事件上报
*/
...
...
m-audioim/src/main/java/com/ydl/audioim/modular/AudioImServiceImp.kt
View file @
5e9cb2bd
...
...
@@ -61,6 +61,19 @@ class AudioImServiceImp : IAudioImService {
dialog
.
show
()
}
override
fun
openPermissionRejectDialog
(
activity
:
Activity
?,
callback
:
()
->
Unit
)
{
val
dialog
=
AxbConfirmDialog
(
activity
,
3
,
object
:
AxbConfirmDialog
.
OnClickEnsureListener
{
override
fun
onClickEnsure
()
{
callback
.
invoke
()
}
override
fun
onClose
()
{
callback
.
invoke
()
}
})
dialog
.
show
()
}
override
fun
callEventSave
(
status
:
String
,
res
:
String
,
session
:
String
?,
line
:
String
)
{
YDLavManager
.
instances
.
callEventSave
(
status
,
res
,
session
,
line
)
}
...
...
m-audioim/src/main/java/com/ydl/audioim/widget/AxbConfirmDialog.kt
View file @
5e9cb2bd
...
...
@@ -4,6 +4,7 @@ import android.app.Activity
import
android.app.Dialog
import
android.graphics.drawable.ColorDrawable
import
android.os.Bundle
import
android.widget.TextView
import
com.ydl.audioim.R
import
kotlinx.android.synthetic.main.audioim_dialog_axb_confirm.*
...
...
@@ -17,7 +18,7 @@ import kotlinx.android.synthetic.main.audioim_dialog_axb_confirm.*
class
AxbConfirmDialog
:
Dialog
{
private
var
activity
:
Activity
?
=
null
private
var
listener
:
OnClickEnsureListener
?
=
null
private
var
type
:
Int
=
1
//弹窗类型,1为手动切换axb布局,2为自动切换axb布局
private
var
type
:
Int
=
1
//弹窗类型,1为手动切换axb布局,2为自动切换axb布局
,3权限拒绝
constructor
(
activity
:
Activity
?,
type
:
Int
,
listener
:
OnClickEnsureListener
?)
:
super
(
activity
)
{
this
.
activity
=
activity
...
...
@@ -29,7 +30,10 @@ class AxbConfirmDialog : Dialog {
super
.
onCreate
(
savedInstanceState
)
if
(
this
.
type
==
2
){
setContentView
(
R
.
layout
.
audioim_dialog_autoaxb_confirm
)
}
else
{
}
else
if
(
this
.
type
==
3
)
{
setContentView
(
R
.
layout
.
audioim_dialog_autoaxb_confirm
)
findViewById
<
TextView
>(
R
.
id
.
tvTip
).
text
=
"您未授权无法使用网络通话\n请点击呼叫使用传统电话"
}
else
{
setContentView
(
R
.
layout
.
audioim_dialog_axb_confirm
)
}
...
...
m-audioim/src/main/res/layout/audioim_dialog_autoaxb_confirm.xml
View file @
5e9cb2bd
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"315dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
@@ -34,6 +33,7 @@
android:src=
"@drawable/audioim_switch_axb"
/>
<TextView
android:id=
"@+id/tvTip"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
View file @
5e9cb2bd
...
...
@@ -11,9 +11,10 @@ import androidx.databinding.DataBindingUtil
import
androidx.fragment.app.DialogFragment
import
com.blankj.utilcode.constant.PermissionConstants
import
com.blankj.utilcode.util.PermissionUtils
import
com.ydl.audioim.api.IAudioImService
import
com.ydl.confide.R
import
com.ydl.confide.databinding.DialogConfidePermissionBinding
import
com.ydl.ydlcommon.
view.dialog.CommonDialog
import
com.ydl.ydlcommon.
modular.findRouteService
class
ConfidePermissionDialog
:
DialogFragment
()
{
...
...
@@ -58,13 +59,14 @@ class ConfidePermissionDialog : DialogFragment() {
private
fun
reject
()
{
dismissAllowingStateLoss
()
CommonDialog
(
context
)
.
setMessage
(
"由于您尚未同意获取麦克风权限,本次通话将使用传统电话方式拨打"
)
.
setRightClick
(
"确定"
)
{
callback
?.
invoke
(
false
)
}
.
setCancelAble
(
false
)
.
show
()
// CommonDialog(context)
// .setMessage("由于您尚未同意获取麦克风权限,本次通话将使用传统电话方式拨打")
// .setRightClick("确定") {
// callback?.invoke(false)
// }
// .setCancelAble(false)
// .show()
findRouteService
(
IAudioImService
::
class
.
java
).
openPermissionRejectDialog
(
activity
)
{
callback
?.
invoke
(
false
)
}
}
override
fun
onStart
()
{
...
...
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