mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Pebble: add toggle for PebbleKit support
The device setting was conflated with "third_party_apps_set_settings" in c3d76477ec, but after reviewing PebbleKitSupport class, the allowed PebbleKit actions are not capable of changing settings on the android device as all of them are just piping data to and from the Pebble device.
PebbleKit messages can change settings on a Pebble device, though, this is possibly the source of the original confusion.
This commit is contained in:
+1
-1
@@ -146,7 +146,7 @@ class PebbleIoThread extends GBDeviceIoThread {
|
|||||||
mPebbleProtocol = (PebbleProtocol) gbDeviceProtocol;
|
mPebbleProtocol = (PebbleProtocol) gbDeviceProtocol;
|
||||||
mBtAdapter = btAdapter;
|
mBtAdapter = btAdapter;
|
||||||
mPebbleSupport = pebbleSupport;
|
mPebbleSupport = pebbleSupport;
|
||||||
mEnablePebblekit = devicePrefs.getBoolean("third_party_apps_set_settings", false);
|
mEnablePebblekit = devicePrefs.getBoolean("pebble_enable_pebblekit", false);
|
||||||
mPebbleProtocol.setAlwaysACKPebbleKit(devicePrefs.getBoolean("pebble_always_ack_pebblekit", false));
|
mPebbleProtocol.setAlwaysACKPebbleKit(devicePrefs.getBoolean("pebble_always_ack_pebblekit", false));
|
||||||
mPebbleProtocol.setEnablePebbleKit(mEnablePebblekit);
|
mPebbleProtocol.setEnablePebbleKit(mEnablePebblekit);
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,17 @@
|
|||||||
android:summary="@string/pref_summary_pebble_gatt_clientonly"
|
android:summary="@string/pref_summary_pebble_gatt_clientonly"
|
||||||
android:title="@string/pref_title_pebble_gatt_clientonly"
|
android:title="@string/pref_title_pebble_gatt_clientonly"
|
||||||
app:iconSpaceReserved="false" />
|
app:iconSpaceReserved="false" />
|
||||||
|
</PreferenceCategory>
|
||||||
|
<PreferenceCategory
|
||||||
|
android:title="PebbleKit"
|
||||||
|
app:iconSpaceReserved="false">
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="pebble_enable_pebblekit"
|
||||||
|
android:layout="@layout/preference_checkbox"
|
||||||
|
android:summary="@string/pref_summary_enable_pebblekit"
|
||||||
|
android:title="@string/pref_title_enable_pebblekit"
|
||||||
|
app:iconSpaceReserved="false" />
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:defaultValue="false"
|
android:defaultValue="false"
|
||||||
android:key="pebble_enable_applogs"
|
android:key="pebble_enable_applogs"
|
||||||
|
|||||||
Reference in New Issue
Block a user