1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-26 16:26:52 +02:00

Bangle.js: Ensure we request a higher MTU if it's been enabled in settings (otherwise Android just uses the default). Really improves communication speed.

This commit is contained in:
Gordon Williams 2024-02-22 12:00:33 +00:00
parent edcdd33f0c
commit dd0dfb23ac

View File

@ -335,6 +335,9 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
Prefs devicePrefs = new Prefs(GBApplication.getDeviceSpecificSharedPrefs(gbDevice.getAddress()));
allowHighMTU = devicePrefs.getBoolean(PREF_ALLOW_HIGH_MTU, true);
if (allowHighMTU && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
builder.requestMtu(131);
}
// No need to clear active line with Ctrl-C now - firmwares in 2023 auto-clear on connect
Prefs prefs = GBApplication.getPrefs();