This allows to construct per-device settings by device type very easily
device coordinators just do the following to declare which setting they support,
the settings activity is then composed at runtime.
@Override
public int[] getSupportedDeviceSpecificSettings(GBDevice device) {
return new int[]{
R.xml.devicesettings_miband3,
R.xml.devicesettings_swipeunlock,
R.xml.devicesettings_pairingkey
};
}
- Migrate language setting
- Migrate menu items setting
- Migrate lastsync timestamp from prefixed global shared prefercence
All settings should be automatically be converted (e.g. Amazfit Bip settings to all paired Amazfit Bip devices) and then deleted.
Cor Settings aleady completely vanished from the global settings menu.
When migration is done we will have a much cleaner settings menu. Will also remove confusion that some Cor settings have to be done in Bip settings.
- Rename MiBand2Service to HuamiService
- Move preferences around (Mi Band 2 has its own device specific settings now)
- Fix Cor menu items not syncing immediately in settings
- Try to support settings menu items on Mi Band 3 (buggy, disabled code for now)
NOTE:
- You will have to be connected while doing the changes in preferences (FIXME)
- It might not work at all since I did not test after the latest changes :P
The way this works will never be a fully working solution, because uris are
*not supposed* to be resolved to a filesystem path. So while this may work
right now, it will most probably fail in the future, with other content providers.
See e.g. https://github.com/iPaulPro/aFileChooser/issues where this code originally came from
(via Stackoverflow).
We won't crash anymore, but we won't support certain content providers. In the long run, we
should search for the proper solution.
Closes#982
TODO:
- also reconstruct json for Pebble background js fake replies
- find a better location for settings
- interatively display candidates when looking up location
- grey out setting on non-cm/los devices
As requested in #736, this adds an entry in the settings menu that allows to blacklist certain calendars.
To avoid confusion, all the former blacklist methods and fields have been renamed to apps_blacklist. The new entries are called calendars_blacklist.
Importing the settings has not been tested with the current changes.
Closes#736
Future improvements TODO: The new setting lives in the Pebble section, i believe in the future the blackslist functionality should be centralized and put in the sidebar.
Basically moved code out of ControlCenter to a separate class. Also provides
change events when the device list has changed, or changes to the device
state have occurred.