diff --git a/app/src/main/java/io/legado/app/help/permission/PermissionsCompat.kt b/app/src/main/java/io/legado/app/help/permission/PermissionsCompat.kt index 4bbed5991..17104108b 100644 --- a/app/src/main/java/io/legado/app/help/permission/PermissionsCompat.kt +++ b/app/src/main/java/io/legado/app/help/permission/PermissionsCompat.kt @@ -1,11 +1,9 @@ package io.legado.app.help.permission -import android.os.Build import androidx.annotation.StringRes import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.Fragment -import org.jetbrains.anko.startActivity -import java.util.ArrayList +import java.util.* class PermissionsCompat private constructor() { @@ -18,7 +16,7 @@ class PermissionsCompat private constructor() { companion object { // 检查权限, 如果已经拥有返回 true fun check(activity: AppCompatActivity, vararg permissions: String): Boolean { - var request: Request = Request(activity) + var request = Request(activity) var pers = ArrayList() pers.addAll(listOf(*permissions)) var data = request.getDeniedPermissions(pers.toTypedArray())