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