1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-19 15:17:50 +01:00

Removed call to start intent if no companion, defaulted companion preference to true, and reordered casio alert preferences to match watch order.

This commit is contained in:
foxstidious 2023-10-13 14:00:53 -04:00 committed by José Rebelo
parent 1f115426fc
commit 40af20a176
5 changed files with 24 additions and 28 deletions

View File

@ -274,12 +274,8 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
context.startActivity(intent);
LOG.debug("CompanionDeviceManager associations were found, starting intent");
} else {
LOG.warn("CompanionDeviceManager associations were not found, going to try to start intent anyway");
GB.notify(GB.NOTIFICATION_ID_PHONE_FIND, notification.build(), context);
// Originally the Phone Find activity wasn't being started if no companion associations.
// Casio GDB-200 doesn't register companion but this still seems to work, so keeping
// warning but starting activity anyway
context.startActivity(intent);
LOG.warn("CompanionDeviceManager associations were not found, can't start intent");
}
}

View File

@ -336,7 +336,7 @@
<string name="pref_summary_preview_message_in_title">Shows a preview of the message in the title of a notification as allowed by the device</string>
<string name="pref_title_casio_alert_calendar">Alert for calendar notifications</string>
<string name="pref_summary_casio_alert_calendar">Alert (vibrate/beep) for calendar notifications</string>
<string name="pref_title_casio_alert_call">Alert for calendar calls</string>
<string name="pref_title_casio_alert_call">Alert for incoming calls</string>
<string name="pref_summary_casio_alert_call">Alert (vibrate/beep) for incoming calls</string>
<string name="pref_title_casio_alert_email">Alert for email notifications</string>
<string name="pref_summary_casio_alert_email">Alert (vibrate/beep) for email notifications</string>

View File

@ -1,33 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_my_calendar"
android:key="casio_alert_calendar"
android:summary="@string/pref_summary_casio_alert_calendar"
android:title="@string/pref_title_casio_alert_calendar" />
<SwitchPreference
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_call"
android:key="casio_alert_call"
android:summary="@string/pref_summary_casio_alert_call"
android:title="@string/pref_title_casio_alert_call" />
<SwitchPreference
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@drawable/ic_email"
android:key="casio_alert_email"
android:summary="@string/pref_summary_casio_alert_email"
android:title="@string/pref_title_casio_alert_email" />
<SwitchPreference
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_help"
android:key="casio_alert_other"
android:summary="@string/pref_summary_casio_alert_other"
android:title="@string/pref_title_casio_alert_other" />
<SwitchPreference
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@drawable/ic_message_outline"
android:key="casio_alert_sms"
android:summary="@string/pref_summary_casio_alert_sms"
android:title="@string/pref_title_casio_alert_sms" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_call"
android:key="casio_alert_call"
android:summary="@string/pref_summary_casio_alert_call"
android:title="@string/pref_title_casio_alert_call" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_my_calendar"
android:key="casio_alert_calendar"
android:summary="@string/pref_summary_casio_alert_calendar"
android:title="@string/pref_title_casio_alert_calendar" />
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_help"
android:key="casio_alert_other"
android:summary="@string/pref_summary_casio_alert_other"
android:title="@string/pref_title_casio_alert_other" />
</androidx.preference.PreferenceScreen>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference
<SwitchPreferenceCompat
android:defaultValue="true"
android:icon="@android:drawable/ic_menu_view"
android:key="preview_message_in_title"

View File

@ -10,7 +10,7 @@
android:title="@string/ignore_bonded_devices"
app:iconSpaceReserved="false" />
<SwitchPreferenceCompat
android:defaultValue="false"
android:defaultValue="true"
android:key="enable_companiondevice_pairing"
android:layout="@layout/preference_checkbox"
android:summary="@string/companiondevice_pairing_details"