diff --git a/android/src/main/java/io/mosip/tuvali/ble/central/impl/GattClient.kt b/android/src/main/java/io/mosip/tuvali/ble/central/impl/GattClient.kt index 4302392d..d18b5a7a 100644 --- a/android/src/main/java/io/mosip/tuvali/ble/central/impl/GattClient.kt +++ b/android/src/main/java/io/mosip/tuvali/ble/central/impl/GattClient.kt @@ -61,14 +61,6 @@ class GattClient(var context: Context) { } } - override fun onPhyRead(gatt: BluetoothGatt?, txPhy: Int, rxPhy: Int, status: Int) { - Log.d(logTag, "Central onPhyRead: txPhy: $txPhy, rxPhy: $rxPhy, status: $status") - } - - override fun onPhyUpdate(gatt: BluetoothGatt?, txPhy: Int, rxPhy: Int, status: Int) { - Log.d(logTag, "Central onPhyUpdate: txPhy: $txPhy, rxPhy: $rxPhy, status: $status") - } - override fun onCharacteristicRead( gatt: BluetoothGatt?, characteristic: BluetoothGattCharacteristic?, @@ -177,9 +169,6 @@ class GattClient(var context: Context) { // TODO: In case device is never connected, how do we know? gatt.requestConnectionPriority(CONNECTION_PRIORITY_HIGH) - gatt.readPhy() - gatt.setPreferredPhy(2, 2, 0) - gatt.readPhy() this.bluetoothGatt = gatt } diff --git a/android/src/main/java/io/mosip/tuvali/ble/peripheral/impl/GattServer.kt b/android/src/main/java/io/mosip/tuvali/ble/peripheral/impl/GattServer.kt index cdf7d908..65c66a4c 100644 --- a/android/src/main/java/io/mosip/tuvali/ble/peripheral/impl/GattServer.kt +++ b/android/src/main/java/io/mosip/tuvali/ble/peripheral/impl/GattServer.kt @@ -74,7 +74,6 @@ class GattServer(private val context: Context) : BluetoothGattServerCallback() { Log.i(logTag, "Connection initiated to central: $connect with device address: ${device?.address}") onDeviceConnectedCallback(status, newState) - device?.let { setPhy(it) } device } else { Log.i(logTag,"Received disconnect from central with device address: ${device?.address}") @@ -90,14 +89,6 @@ class GattServer(private val context: Context) : BluetoothGattServerCallback() { onMTUChangedCallback(allowedMTU) } - private fun setPhy(bluetoothDevice: BluetoothDevice) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - gattServer.readPhy(bluetoothDevice) - gattServer.setPreferredPhy(bluetoothDevice, 2, 2, 0) - gattServer.readPhy(bluetoothDevice) - } - } - override fun onCharacteristicWriteRequest( device: BluetoothDevice?, requestId: Int, @@ -144,14 +135,6 @@ class GattServer(private val context: Context) : BluetoothGattServerCallback() { } } - override fun onPhyRead(device: BluetoothDevice?, txPhy: Int, rxPhy: Int, status: Int) { - Log.d(logTag, "Peripheral onPhyRead: txPhy: $txPhy, rxPhy: $rxPhy, status: $status") - } - - override fun onPhyUpdate(device: BluetoothDevice?, txPhy: Int, rxPhy: Int, status: Int) { - Log.d(logTag, "Peripheral onPhyUpdate: txPhy: $txPhy, rxPhy: $rxPhy, status: $status") - } - fun disconnect(): Boolean { return if(bluetoothDevice != null) { Log.d(logTag, "Disconnecting from central with device address: ${bluetoothDevice?.address}")