A lof of devices will simply work anyway even if already paired in
Android bluetooth settings. Discover them by default, but warn the user
if the device is not known to pair correctly if already paired in Android
settings. Allows this warning to be disabled to known working devices.
Ensure TimeChangeReceiver alarm is scheduled when enabling
datetime_synconconnect and registering TimeChangeReceiver broadcast
receiver.
It is important to re-schedule the alarm after registering broadcast
receiver, because:
1. if broadcast receiver was unregistered while previous alarm arrived,
there is no alarm scheduled;
2. re-scheduling the alarm resets the periodic time sync timer when
first device is connected (which is desired).
It is important to re-schedule the alarm when datetime_synconconnect
gets enabled, because there might be no alarm scheduled.
Call onSetTime() when enabling datetime_synconconnect.
* 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.
Gadgetbridge can be configured to perform an action when a
Huami device is taken off or the user was detected to fall asleep or
wake up. This functionality was specific to Huami devices, but this
changeset moves this upstream to the AbstractDeviceSupport class in
combination with new GBDeviceEvents.
Now that the ADS has centralized support for this functionality, the
same logic can be used for other devices. In this case, an
implementation is added for supported Xiaomi devices.