mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
d5266cb50e
commit
9a2f299f07
@ -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<String>? = 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) {
|
||||
|
@ -6,4 +6,5 @@ import androidx.lifecycle.AndroidViewModel
|
||||
class MainViewModel(application: Application) : AndroidViewModel(application) {
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user