1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-29 13:26:50 +01:00

Prefs: make allow high MTU default to true.

It is 2023, it should work, if not it can be turned off.

For newer devices with big firmwares and apps (like Mi Band 7), people just wonder how slow Gadgetbridge installs stuff...
This commit is contained in:
Andreas Shimokawa 2023-06-14 16:44:51 +02:00
parent 7262197a34
commit f80b873866
3 changed files with 3 additions and 3 deletions

View File

@ -317,7 +317,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
builder.notify(rxCharacteristic, true); builder.notify(rxCharacteristic, true);
Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress())); Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()));
allowHighMTU = devicePrefs.getBoolean(PREF_ALLOW_HIGH_MTU, false); allowHighMTU = devicePrefs.getBoolean(PREF_ALLOW_HIGH_MTU, true);
uartTx(builder, " \u0003"); // clear active line uartTx(builder, " \u0003"); // clear active line

View File

@ -4142,7 +4142,7 @@ public abstract class HuamiSupport extends AbstractBTLEDeviceSupport implements
protected void setMtu(final int mtu) { protected void setMtu(final int mtu) {
final Prefs prefs = getDevicePrefs(); final Prefs prefs = getDevicePrefs();
if (!prefs.getBoolean(PREF_ALLOW_HIGH_MTU, false)) { if (!prefs.getBoolean(PREF_ALLOW_HIGH_MTU, true)) {
LOG.warn("High MTU is not allowed, ignoring"); LOG.warn("High MTU is not allowed, ignoring");
return; return;
} }

View File

@ -2,7 +2,7 @@
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<SwitchPreference <SwitchPreference
android:icon="@drawable/ic_mtu" android:icon="@drawable/ic_mtu"
android:defaultValue="false" android:defaultValue="true"
android:key="allow_high_mtu" android:key="allow_high_mtu"
android:summary="@string/pref_summary_allow_high_mtu" android:summary="@string/pref_summary_allow_high_mtu"
android:title="@string/pref_title_allow_high_mtu" /> android:title="@string/pref_title_allow_high_mtu" />