Commit 0e7795fc authored by mengcuiguang2's avatar mengcuiguang2

首页权限优化

parent 4fb3c46b
...@@ -75,10 +75,9 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() { ...@@ -75,10 +75,9 @@ class MainActivity : BaseActivity<ActivityMainBinding, MainViewModel>() {
PermissionX.init(this).permissions( PermissionX.init(this).permissions(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) Manifest.permission.ACCESS_BACKGROUND_LOCATION else "", if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) Manifest.permission.ACCESS_BACKGROUND_LOCATION else "",
Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION
Manifest.permission.WRITE_EXTERNAL_STORAGE, ).request(RequestCallback { allGranted, grantedList, deniedList ->
Manifest.permission.READ_PHONE_STATE })
)
viewModel.checkUpgrade() viewModel.checkUpgrade()
} }
var oldTime: Long = 0 var oldTime: Long = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment