Possible bug in background priority settings logic
See original GitHub issueAvoid duplicates
- Bug is not mentioned in the FAQ
- Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
- Bug is not already reported in another issue
Describe the bug
This is a finding from code review:
- In
fragment_settings_background_priority
the logic to show that background priority is enabled is negated:app:enabled="@{!settingsViewModel.isBackgroundPriorityEnabled()}"
- The copy for this setting suggests that the logic should not be negated:
<string name="settings_background_priority_title">"Prioritized Background Activity"</string>
Expected behaviour
When the user has enabled “Prioritized Background Activity” (in system lingo isIgnoringBatteryOptimizations
) it should show as enabled. When the setting is disabled, it should show as disabled.
Steps to reproduce the issue
It is not in current release yet
Possible Fix
Remove the negation here: https://github.com/corona-warn-app/cwa-app-android/blob/dev/Corona-Warn-App/src/main/res/layout/fragment_settings_background_priority.xml#L66
Additional context
The system preferences also show “isIgnoringBatteryOptimizations” (= “Prioritized Background Activity”) as enabled. The logic in the app should not be different in order to not confuse the user.
Internal Tracking ID: EXPOSUREAPP-1928
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Decrease the process priority of content processes that are not ...
I'm not a big fan of process priority setting in general and would prefer a different solution to handle background tabs. We own...
Read more >Optimizing resource loading with Priority Hints - web.dev
Priority Hints indicate the relative priority of resources to the browser. They can enable optimal loading and improve Core Web Vitals.
Read more >Avoid system overloads in Logic Pro - Apple Support
Learn what to do if you get system overload alerts in Logic Pro. ... Choose Logic Pro > Settings (or Preferences) > Advanced...
Read more >Remove background in settings - MythoLogic Interactive Forums
I played in 15-23 FPS on official maps. The only way to continue playing is to remove background from all maps. This will...
Read more >4 Product Backlog Prioritization Techniques That Work
Here are a few concrete product backlog prioritization techniques, so your team is delivering the most valuable work possible.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m currently not in Germany and using the Austrian counterpart. As you can only have one tracking app, it will take a while to get onto this. If there are no other people reporting this, I’d consider this issue closeable. Sorry band thanks
I am not familiar with Android development, but from what I see, https://github.com/corona-warn-app/cwa-app-android/blob/7590e2a777e28808d08096ccd4260f4d445443be/Corona-Warn-App/src/main/res/layout/fragment_settings_background_priority.xml#L66 seems to be used to disable the settings switch in the UI, once the setting is on. This is needed, because the user cannot switch off the setting from within the CWA, but needs to do it through Android’s app settings.
The “status” of the setting seems to be queried here: https://github.com/corona-warn-app/cwa-app-android/blob/7590e2a777e28808d08096ccd4260f4d445443be/Corona-Warn-App/src/main/res/layout/fragment_settings_background_priority.xml#L71 which would be correct.