Loading android/pandora/server/src/com/android/pandora/Security.kt +2 −2 Original line number Diff line number Diff line Loading @@ -90,14 +90,14 @@ class Security(private val context: Context) : SecurityImplBase() { var reached = when (transport) { TRANSPORT_LE -> { check(request.hasLe()) check(request.getLevelCase() == SecureRequest.LevelCase.LE); val level = request.le if (level == LE_LEVEL1) true if (level == LE_LEVEL4) throw Status.UNKNOWN.asException() false } TRANSPORT_BREDR -> { check(request.hasClassic()) check(request.getLevelCase() == SecureRequest.LevelCase.CLASSIC) val level = request.classic if (level == LEVEL0) true if (level >= LEVEL3) throw Status.UNKNOWN.asException() Loading android/pandora/server/src/com/android/pandora/SecurityStorage.kt +2 −2 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class SecurityStorage(private val context: Context) : SecurityStorageImplBase() override fun isBonded(request: IsBondedRequest, responseObserver: StreamObserver<BoolValue>) { grpcUnary(globalScope, responseObserver) { check(request.hasPublic()) check(request.getAddressCase() == IsBondedRequest.AddressCase.PUBLIC) val bluetoothDevice = request.public.toBluetoothDevice(bluetoothAdapter) Log.i(TAG, "isBonded: $bluetoothDevice") val isBonded = bluetoothDevice.getBondState() == BluetoothDevice.BOND_BONDED Loading @@ -75,7 +75,7 @@ class SecurityStorage(private val context: Context) : SecurityStorageImplBase() override fun deleteBond(request: DeleteBondRequest, responseObserver: StreamObserver<Empty>) { grpcUnary(globalScope, responseObserver) { check(request.hasPublic()) check(request.getAddressCase() == DeleteBondRequest.AddressCase.PUBLIC) val bluetoothDevice = request.public.toBluetoothDevice(bluetoothAdapter) Log.i(TAG, "deleteBond: device=$bluetoothDevice") Loading Loading
android/pandora/server/src/com/android/pandora/Security.kt +2 −2 Original line number Diff line number Diff line Loading @@ -90,14 +90,14 @@ class Security(private val context: Context) : SecurityImplBase() { var reached = when (transport) { TRANSPORT_LE -> { check(request.hasLe()) check(request.getLevelCase() == SecureRequest.LevelCase.LE); val level = request.le if (level == LE_LEVEL1) true if (level == LE_LEVEL4) throw Status.UNKNOWN.asException() false } TRANSPORT_BREDR -> { check(request.hasClassic()) check(request.getLevelCase() == SecureRequest.LevelCase.CLASSIC) val level = request.classic if (level == LEVEL0) true if (level >= LEVEL3) throw Status.UNKNOWN.asException() Loading
android/pandora/server/src/com/android/pandora/SecurityStorage.kt +2 −2 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class SecurityStorage(private val context: Context) : SecurityStorageImplBase() override fun isBonded(request: IsBondedRequest, responseObserver: StreamObserver<BoolValue>) { grpcUnary(globalScope, responseObserver) { check(request.hasPublic()) check(request.getAddressCase() == IsBondedRequest.AddressCase.PUBLIC) val bluetoothDevice = request.public.toBluetoothDevice(bluetoothAdapter) Log.i(TAG, "isBonded: $bluetoothDevice") val isBonded = bluetoothDevice.getBondState() == BluetoothDevice.BOND_BONDED Loading @@ -75,7 +75,7 @@ class SecurityStorage(private val context: Context) : SecurityStorageImplBase() override fun deleteBond(request: DeleteBondRequest, responseObserver: StreamObserver<Empty>) { grpcUnary(globalScope, responseObserver) { check(request.hasPublic()) check(request.getAddressCase() == DeleteBondRequest.AddressCase.PUBLIC) val bluetoothDevice = request.public.toBluetoothDevice(bluetoothAdapter) Log.i(TAG, "deleteBond: device=$bluetoothDevice") Loading