This PR:
- fixes some errors reported by `gradlew lint` and the Android Studio "Code Inspection" tool
- adds a snapshot file `lint-baseline.xml` of the remaining lint errors and warnings to be used by the linter as baseline
- adds a job for CI to run `gradlew lint` on every build
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3291
Reviewed-by: José Rebelo <joserebelo@noreply.codeberg.org>
Co-authored-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
Co-committed-by: Arjan Schrijver <a_gadgetbridge@anymore.nl>
- Extend AbstractSettingsActivityV2
- Replace all checkbox preferences with switch preferences
- Add app:useSimpleSummaryProvider to all preferences that were in getPreferenceKeysWithSummary
- Add null checks on all prefs to fix crashes in nested preference screens
- Replace listeners with lambdas to reduce code indentation
- Set input type to number where relevant
This class introduces some of the common logic across preference
screens, handling nested PreferenceScreens, as well as the back button
and action bar title setting.
* Check for bluetooth permissions in DiscoveryActivity
* At startup we now pop up a dialog explaining why we want *any* permissions
* Fixing ControlCenterv2 permissions requests for Android S and later (requesting background location stopped *any* dialog appearing)
* Fixing all errors in DiscoveryActivity from Android Studio by catching errors
* Move permission requests around to ensure that we only call RequestMultiplePermissions from onCreate
* Only show dialog if we have permissions to request
* Fix "LifecycleOwners must call register before they are STARTED" on some Android devices: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3192/files#issuecomment-967267
- Make ChartsHost independent from ChartsActivity
- Rename ChartsActivity to ActivityChartsActivity
- Rename AbstractChartFragment to AbstractActivityChartFragment
- Pull common charts logic to parent classes:
- From ActivityChartsActivity to AbstractChartsActivity
- From AbstractActivityChartFragment to AbstractChartsFragment