From e478e11f22308410f4335d15dfb5f1462239f5a7 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 16 Feb 2020 20:32:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/help/permission/OnPermissionsDeniedCallback.kt | 2 ++ app/src/main/java/io/legado/app/help/permission/Request.kt | 2 +- app/src/main/java/io/legado/app/ui/about/AboutFragment.kt | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/permission/OnPermissionsDeniedCallback.kt b/app/src/main/java/io/legado/app/help/permission/OnPermissionsDeniedCallback.kt index d6e81a68f..4a51881b0 100644 --- a/app/src/main/java/io/legado/app/help/permission/OnPermissionsDeniedCallback.kt +++ b/app/src/main/java/io/legado/app/help/permission/OnPermissionsDeniedCallback.kt @@ -1,5 +1,7 @@ package io.legado.app.help.permission interface OnPermissionsDeniedCallback { + fun onPermissionsDenied(requestCode: Int, deniedPermissions: Array) + } diff --git a/app/src/main/java/io/legado/app/help/permission/Request.kt b/app/src/main/java/io/legado/app/help/permission/Request.kt index 1fc765bf9..600cbe93c 100644 --- a/app/src/main/java/io/legado/app/help/permission/Request.kt +++ b/app/src/main/java/io/legado/app/help/permission/Request.kt @@ -43,7 +43,7 @@ internal class Request : OnRequestPermissionsResultCallback { } fun addPermissions(vararg permissions: String) { - this.permissions?.addAll(Arrays.asList(*permissions)) + this.permissions?.addAll(listOf(*permissions)) } fun setRequestCode(requestCode: Int) { diff --git a/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt b/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt index 0318483bb..1998f6f3f 100644 --- a/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt +++ b/app/src/main/java/io/legado/app/ui/about/AboutFragment.kt @@ -97,7 +97,8 @@ class AboutFragment : PreferenceFragmentCompat() { val intent = Intent() intent.data = Uri.parse("mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26k%3D$key") - // 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 //intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + // 此Flag可根据具体产品需要自定义,如设置,则在加群界面按返回,返回手Q主界面,不设置,按返回会返回到呼起产品界面 + // intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) return try { startActivity(intent) false