mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 17:11:56 +01:00
remove some remaining lollipop checks
This commit is contained in:
parent
d3f88797d6
commit
4a2d09c4c8
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user