From 6b38d5b283adfc6522585cc6d0521b913cdfe0f3 Mon Sep 17 00:00:00 2001 From: Daniele Gobbetti Date: Fri, 23 Aug 2024 13:27:55 +0200 Subject: [PATCH] Pebble: split the pebble device specific settings in the existing root screens --- .../devices/pebble/PebbleCoordinator.java | 16 +- .../xml/devicesettings_pebble_activity.xml | 43 ++++++ .../xml/devicesettings_pebble_calendar.xml | 16 ++ ...icesettings_pebble_calls_notifications.xml | 19 +++ .../xml/devicesettings_pebble_developer.xml | 60 ++++++++ .../xml/devicesettings_pebble_preferences.xml | 145 ------------------ 6 files changed, 145 insertions(+), 154 deletions(-) create mode 100644 app/src/main/res/xml/devicesettings_pebble_activity.xml create mode 100644 app/src/main/res/xml/devicesettings_pebble_calendar.xml create mode 100644 app/src/main/res/xml/devicesettings_pebble_calls_notifications.xml create mode 100644 app/src/main/res/xml/devicesettings_pebble_developer.xml delete mode 100644 app/src/main/res/xml/devicesettings_pebble_preferences.xml diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PebbleCoordinator.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PebbleCoordinator.java index 322c7d8da..5cc6462d8 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PebbleCoordinator.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/devices/pebble/PebbleCoordinator.java @@ -227,28 +227,26 @@ public class PebbleCoordinator extends AbstractBLClassicDeviceCoordinator { return true; } -// @Override -// public int[] getSupportedDeviceSpecificSettings(GBDevice device) { -// return new int[]{ -// , -// R.xml.devicesettings_transliteration -// }; -// } - @Override public DeviceSpecificSettings getDeviceSpecificSettings(final GBDevice device) { final DeviceSpecificSettings deviceSpecificSettings = new DeviceSpecificSettings(); final List notifications = deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.CALLS_AND_NOTIFICATIONS); notifications.add(R.xml.devicesettings_autoremove_notifications); + notifications.add(R.xml.devicesettings_pebble_calls_notifications); notifications.add(R.xml.devicesettings_canned_reply_16); notifications.add(R.xml.devicesettings_canned_dismisscall_16); notifications.add(R.xml.devicesettings_transliteration); final List calendar = deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.CALENDAR); calendar.add(R.xml.devicesettings_sync_calendar); + calendar.add(R.xml.devicesettings_pebble_calendar); - deviceSpecificSettings.addRootScreen(R.xml.devicesettings_pebble_preferences); + final List activity = deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.ACTIVITY_INFO); + activity.add(R.xml.devicesettings_pebble_activity); + + final List dev = deviceSpecificSettings.addRootScreen(DeviceSpecificSettingsScreen.DEVELOPER); + dev.add(R.xml.devicesettings_pebble_developer); return deviceSpecificSettings; } diff --git a/app/src/main/res/xml/devicesettings_pebble_activity.xml b/app/src/main/res/xml/devicesettings_pebble_activity.xml new file mode 100644 index 000000000..555d25e2b --- /dev/null +++ b/app/src/main/res/xml/devicesettings_pebble_activity.xml @@ -0,0 +1,43 @@ + + + + + + + + > + + + diff --git a/app/src/main/res/xml/devicesettings_pebble_calendar.xml b/app/src/main/res/xml/devicesettings_pebble_calendar.xml new file mode 100644 index 000000000..4fbfb2b64 --- /dev/null +++ b/app/src/main/res/xml/devicesettings_pebble_calendar.xml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/app/src/main/res/xml/devicesettings_pebble_calls_notifications.xml b/app/src/main/res/xml/devicesettings_pebble_calls_notifications.xml new file mode 100644 index 000000000..7a211833e --- /dev/null +++ b/app/src/main/res/xml/devicesettings_pebble_calls_notifications.xml @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/xml/devicesettings_pebble_developer.xml b/app/src/main/res/xml/devicesettings_pebble_developer.xml new file mode 100644 index 000000000..0f40e12be --- /dev/null +++ b/app/src/main/res/xml/devicesettings_pebble_developer.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/devicesettings_pebble_preferences.xml b/app/src/main/res/xml/devicesettings_pebble_preferences.xml deleted file mode 100644 index fa8c090e9..000000000 --- a/app/src/main/res/xml/devicesettings_pebble_preferences.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - > - - - - - - - - - - - - -