From 9a2f299f07256807dbef8c245b2651bce1442590 Mon Sep 17 00:00:00 2001 From: Invinciblelee <1760316362@qq.com> Date: Thu, 30 May 2019 17:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/help/permission/Request.kt | 8 ++++---- app/src/main/java/io/legado/app/ui/main/MainViewModel.kt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) 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 60db12240..aa086aba2 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 @@ -14,8 +14,8 @@ import java.util.* internal class Request : OnRequestPermissionsResultCallback { - val startTime: Long - private var requestCode: Int = 0 + private val requestTime: Long + private var requestCode: Int = TYPE_REQUEST_PERMISSION private var source: RequestSource? = null private var permissions: ArrayList? = null private var grantedCallback: OnPermissionsGrantedCallback? = null @@ -31,15 +31,15 @@ internal class Request : OnRequestPermissionsResultCallback { } constructor(activity: AppCompatActivity) { - startTime = System.currentTimeMillis() source = ActivitySource(activity) permissions = ArrayList() + requestTime = System.currentTimeMillis() } constructor(fragment: Fragment) { - startTime = System.currentTimeMillis() source = FragmentSource(fragment) permissions = ArrayList() + requestTime = System.currentTimeMillis() } fun addPermissions(vararg permissions: String) { diff --git a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt index 82a9146c5..671f1c660 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainViewModel.kt @@ -6,4 +6,5 @@ import androidx.lifecycle.AndroidViewModel class MainViewModel(application: Application) : AndroidViewModel(application) { + } \ No newline at end of file