mirror of
https://github.com/SagerNet/sing-box-for-android.git
synced 2025-04-03 20:07:38 +03:00
Fix check IBO resut
This commit is contained in:
parent
95401743e9
commit
6c1f49a00e
1 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,6 @@
|
||||||
package io.nekohasekai.sfa.ui.main
|
package io.nekohasekai.sfa.ui.main
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
|
@ -48,8 +47,8 @@ class SettingsFragment : Fragment() {
|
||||||
private val requestIgnoreBatteryOptimizations = registerForActivityResult(
|
private val requestIgnoreBatteryOptimizations = registerForActivityResult(
|
||||||
ActivityResultContracts.StartActivityForResult()
|
ActivityResultContracts.StartActivityForResult()
|
||||||
) { result ->
|
) { result ->
|
||||||
if (result.resultCode == Activity.RESULT_OK) {
|
if (Application.powerManager.isIgnoringBatteryOptimizations(Application.application.packageName)) {
|
||||||
binding.backgroundPermissionCard.isVisible = false
|
binding.backgroundPermissionCard.isGone = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue