-
Notifications
You must be signed in to change notification settings - Fork 46
Feature/slow mode whitelisst #1751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| var showWhitelistEnableDialog by mutableStateOf(false) | ||
| var showWhitelistDisableDialog by mutableStateOf(false) | ||
|
|
||
| var whiteListControl: SwitchPreferenceCompat? = null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these be private?
|
|
||
| var whiteListControl: SwitchPreferenceCompat? = null | ||
|
|
||
| private val composeView by lazy { ComposeView(requireContext()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't retain views in fragments because fragment will create/destroy view as necessary. So it should be:
private var composeView: ComposeView? = null
then create and assign it in onCreateView
| startActivity(intent) // shows the system dialog for this specific app | ||
| } catch (_: ActivityNotFoundException) { | ||
| // Fallback to the general settings list | ||
| startActivity(Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can ActivityNotFoundException happen to this too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably can on some custom ROMs. I'll try the basic settings and then show a toast if even that fails
SES-4975 - New UI to help users with Slow Mode to make sure Session is whitelisted as allowed to run in the background.