remove some remaining lollipop checks

This commit is contained in:
Andreas Shimokawa 2024-12-21 23:59:13 +01:00
parent d3f88797d6
commit 4a2d09c4c8
4 changed files with 2 additions and 9 deletions

View File

@ -16,13 +16,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
package nodomain.freeyourgadget.gadgetbridge.service.btbr;
import android.os.Build;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import nodomain.freeyourgadget.gadgetbridge.service.btbr.actions.WaitAction;
import nodomain.freeyourgadget.gadgetbridge.service.btbr.actions.WriteAction;

View File

@ -77,7 +77,6 @@ public class TransactionBuilder {
return this;
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
public TransactionBuilder requestMtu(int mtu){
return add(
new RequestMtuAction(mtu)

View File

@ -352,7 +352,7 @@ 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) {
if (allowHighMTU) {
builder.requestMtu(131);
}
// No need to clear active line with Ctrl-C now - firmwares in 2023 auto-clear on connect

View File

@ -29,7 +29,6 @@ import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCharacteristic;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.widget.Toast;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@ -511,9 +510,7 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
batteryInfoProfile.requestBatteryInfo(builder);
batteryInfoProfile.enableNotify(builder, true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
builder.requestMtu(256);
}
builder.requestMtu(256);
return builder;
}