This adds a new dashboard-type view to Gadgetbridge. The new dashboard activity displays several widgets with aggregated statistics from multiple devices. New preferences are added to allow configuration of the dashboard and its widgets. A new bottom navigation bar is added to switch between the Dashboard and Devices views.
Some issues that prompted this feature and provided inspiration for the implementation:
- https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/301 (More Intuitive User Interface)
- https://codeberg.org/Freeyourgadget/Gadgetbridge/issues/3074 (Ability to merge historical data from several devices)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3478
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>
Wake lock with around 10 second timeout is a quick and dirty solution,
however as the time sync should happen once per several days the 10
second wake time should not be an issue.
Zepp OS 3 firmware upgrades are big (200MB+). Gadgetbridge was crashing,
since the entire firmware file would be pulled into memory.
This commit unifies all the logic for Zepp OS firmware handling.
However, since the needed refactor was big, this commit duplicates some
of the code from Huami classes, namely:
- ZeppOsFirmwareUpdateOperation clones UpdateFirmwareOperation2020
- ZeppOsFwInstallHandler clones AbstractMiBandFWInstallHandler
This avoids changes to older device logic and introducing regressions.
Lost functionality:
- Repackaging firmwares as UIHH (does not seem to be needed, and was not
used anyway). Code can be recovered from this commit if needed in the
future
- Whitelisted firmwares by checksum (we do not have a lot of them at
this point anyway)
Other misc changes:
- Rename ZipFile to GBZipFile not to clash with the java class
Tested by updating the Amazfit GTR 4 to Zepp OS 3.
* Add general_reconnectonlytoconnected setting.
* Replace last_device_address shared prefs string with
last_device_addresses shared prefs string set.
Bluetooth address of a device is added to last_device_addresses when
connecting to the device.
Bluetooth address of a device is removed from last_device_addresses only
when deleting the device or explicitly disconnecting from the device
(e.g. by selecting "Disconnect" in the device tile menu).
* Adjust ExternalPebbleJSActivity to better support multiple connected
devices.
Math.multiplyExact is only available on SDK24 onward. We do not expect
an overflow to occur here, since the hashLength is fixed and the outputLength
is small (32 on all current calls).
We should use NFKD instead of NFD since we are flattening to US-ASCII
afterwards anyway. This allows various Unicode characters which would
end up as a question mark to be represented by their compatibility
decomposition. This applies to e.g. ligatures (e.g. U+FB01 LATIN SMALL
LIGATURE FI will now be replaced with plain fi instead of a question
mark), and also the U+00A0 NO-BREAK SPACE [NBSP] to be replaced by
a normal space instead of a question mark.
+Add Czech fancy quotes to the Czech transliterator
+Add a unit test for Multitransliterator
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>
This PR aims to optimize the method of synchronizing the menu_structure for the openSourceWatchface by making the menu_structure request from the watch obsolete.
Instead, when a new menu_structure is sent to GB via the Intent `nodomain.freeyourgadget.gadgetbridge.Q_SET_MENU_STRUCTURE`, GB remembers that JSON.
Next time a watchface is built, the JSON is embedded into that app package so the watch doesn't forget the structure.
This requires a full GB rebuild to work properky.
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3245
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-committed-by: Daniel Dakhno <dakhnod@gmail.com>