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
247de44c
Commit
247de44c
authored
Jun 30, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/qj/confide_optimize' into 'd/v_confide_optimized'
倾诉权限 See merge request app_android_lib/YDL-Component!209
parents
fd1732ec
5928bf0b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
24 deletions
+16
-24
build.gradle
build.gradle
+0
-1
config.gradle
config.gradle
+1
-1
ConfidePermissionDialog.kt
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
+12
-11
build.gradle
m-home/build.gradle
+0
-7
DeviceTool.java
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/DeviceTool.java
+1
-2
styles.xml
ydl-platform/src/main/res/values/styles.xml
+2
-2
No files found.
build.gradle
View file @
247de44c
...
@@ -33,7 +33,6 @@ buildscript {
...
@@ -33,7 +33,6 @@ buildscript {
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath
'com.ydl.plugins:modular:1.0.3'
classpath
'com.ydl.plugins:modular:1.0.3'
classpath
'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath
'com.ydl:notracepoint-gradle-plugin:0.0.3'
classpath
'com.ydl.plugins:restools:1.0.1'
}
}
}
}
...
...
config.gradle
View file @
247de44c
...
@@ -208,7 +208,7 @@ ext {
...
@@ -208,7 +208,7 @@ ext {
"blankUtil"
:
"com.blankj:utilcode:1.25.9"
,
"blankUtil"
:
"com.blankj:utilcode:1.25.9"
,
"ydl-hnet"
:
"com.ydl:h-net:0.0.8"
,
"ydl-hnet"
:
"com.ydl:h-net:0.0.8"
,
"ydl-user-router"
:
"com.ydl:router:1.0.0-SNAPSHOT@aar"
,
"ydl-user-router"
:
"com.ydl:router:1.0.0-SNAPSHOT@aar"
,
"ydl-device"
:
"com.ydl:device-id:0.0.3
0@aar
"
,
"ydl-device"
:
"com.ydl:device-id:0.0.3
1
"
,
"ydl-net"
:
"com.ydl:ydl-net:${ydl2PublishVersion}"
,
"ydl-net"
:
"com.ydl:ydl-net:${ydl2PublishVersion}"
,
"ydl-utils"
:
"com.ydl:ydl-utils:${ydl2PublishVersion}"
,
"ydl-utils"
:
"com.ydl:ydl-utils:${ydl2PublishVersion}"
,
...
...
m-confide/src/main/java/com/ydl/confide/home/ConfidePermissionDialog.kt
View file @
247de44c
...
@@ -7,13 +7,13 @@ import android.os.Bundle
...
@@ -7,13 +7,13 @@ import android.os.Bundle
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
androidx.core.app.ActivityCompat
import
androidx.databinding.DataBindingUtil
import
androidx.databinding.DataBindingUtil
import
androidx.fragment.app.DialogFragment
import
androidx.fragment.app.DialogFragment
import
com.blankj.utilcode.constant.PermissionConstants
import
com.blankj.utilcode.constant.PermissionConstants
import
com.blankj.utilcode.util.PermissionUtils
import
com.blankj.utilcode.util.PermissionUtils
import
com.ydl.confide.R
import
com.ydl.confide.R
import
com.ydl.confide.databinding.DialogConfidePermissionBinding
import
com.ydl.confide.databinding.DialogConfidePermissionBinding
import
com.ydl.ydlcommon.view.dialog.CommonDialog
class
ConfidePermissionDialog
:
DialogFragment
()
{
class
ConfidePermissionDialog
:
DialogFragment
()
{
...
@@ -37,8 +37,7 @@ class ConfidePermissionDialog : DialogFragment() {
...
@@ -37,8 +37,7 @@ class ConfidePermissionDialog : DialogFragment() {
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
binding
.
ivClose
.
setOnClickListener
{
binding
.
ivClose
.
setOnClickListener
{
callback
?.
invoke
(
false
)
reject
()
dismiss
()
}
}
binding
.
tvBtn
.
setOnClickListener
{
binding
.
tvBtn
.
setOnClickListener
{
...
@@ -51,19 +50,21 @@ class ConfidePermissionDialog : DialogFragment() {
...
@@ -51,19 +50,21 @@ class ConfidePermissionDialog : DialogFragment() {
}
}
override
fun
onDenied
(
permissionsDeniedForever
:
MutableList
<
String
>?,
permissionsDenied
:
MutableList
<
String
>?)
{
override
fun
onDenied
(
permissionsDeniedForever
:
MutableList
<
String
>?,
permissionsDenied
:
MutableList
<
String
>?)
{
callback
?.
invoke
(
false
)
reject
()
dismissAllowingStateLoss
()
}
}
}).
request
()
}).
request
()
}
}
}
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
private
fun
reject
()
{
super
.
onActivityCreated
(
savedInstanceState
)
dismissAllowingStateLoss
()
if
(!
ActivityCompat
.
shouldShowRequestPermissionRationale
(
requireActivity
(),
Manifest
.
permission
.
RECORD_AUDIO
))
{
CommonDialog
(
context
)
callback
?.
invoke
(
false
)
.
setMessage
(
"由于您尚未同意获取麦克风权限,本次通话将使用传统电话方式拨打"
)
dismissAllowingStateLoss
()
.
setRightClick
(
"确定"
)
{
}
callback
?.
invoke
(
false
)
}
.
setCancelAble
(
false
)
.
show
()
}
}
override
fun
onStart
()
{
override
fun
onStart
()
{
...
...
m-home/build.gradle
View file @
247de44c
...
@@ -2,13 +2,6 @@ apply plugin: 'com.android.library'
...
@@ -2,13 +2,6 @@ apply plugin: 'com.android.library'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-android'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'kotlin-kapt'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'resTools'
// 资源重命名插件
// 配置资源重命名插件
resConfig
{
new_prefix
=
'home_'
// 资源前缀
old_prefix
=
''
// 老前缀,可为''空字符串
}
kapt
{
kapt
{
arguments
{
arguments
{
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/DeviceTool.java
View file @
247de44c
...
@@ -49,7 +49,6 @@ public class DeviceTool {
...
@@ -49,7 +49,6 @@ public class DeviceTool {
}
else
{
}
else
{
activity
.
startActivity
(
getAppDetailSettingIntent
());
activity
.
startActivity
(
getAppDetailSettingIntent
());
}
}
gotoMiuiPermission
(
activity
);
}
}
/**
/**
...
@@ -57,7 +56,7 @@ public class DeviceTool {
...
@@ -57,7 +56,7 @@ public class DeviceTool {
*/
*/
private
static
void
gotoMiuiPermission
(
Activity
activity
)
{
private
static
void
gotoMiuiPermission
(
Activity
activity
)
{
Intent
i
=
new
Intent
(
"miui.intent.action.APP_PERM_EDITOR"
);
Intent
i
=
new
Intent
(
"miui.intent.action.APP_PERM_EDITOR"
);
ComponentName
componentName
=
new
ComponentName
(
"com.miui.securitycenter"
,
"com.miui.permcenter.permissions.
App
PermissionsEditorActivity"
);
ComponentName
componentName
=
new
ComponentName
(
"com.miui.securitycenter"
,
"com.miui.permcenter.permissions.PermissionsEditorActivity"
);
i
.
setComponent
(
componentName
);
i
.
setComponent
(
componentName
);
i
.
putExtra
(
"extra_pkgname"
,
getPackageName
());
i
.
putExtra
(
"extra_pkgname"
,
getPackageName
());
try
{
try
{
...
...
ydl-platform/src/main/res/values/styles.xml
View file @
247de44c
...
@@ -38,8 +38,8 @@
...
@@ -38,8 +38,8 @@
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
<item
name=
"android:windowIsTranslucent"
>
false
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:windowNoTitle"
>
true
</item>
<item
name=
"android:layout_marginRight"
>
3
0dp
</item>
<item
name=
"android:layout_marginRight"
>
0dp
</item>
<item
name=
"android:layout_marginLeft"
>
3
0dp
</item>
<item
name=
"android:layout_marginLeft"
>
0dp
</item>
<item
name=
"android:windowBackground"
>
@drawable/platform_normaldialog_bg
</item>
<item
name=
"android:windowBackground"
>
@drawable/platform_normaldialog_bg
</item>
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
</style>
...
...
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