Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bceabaa authored by Martin Brabham's avatar Martin Brabham
Browse files

OOB: Connect callback for generateOobData for LE

Bug: 184377951
Test: compiles, test app gets data
Tag: #feature
Change-Id: I1aad78533cd0cfbc7543b76356943bc85ced1a8a
parent bb4ea601
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -491,6 +491,12 @@ static void generate_local_oob_data_callback(tBT_TRANSPORT transport,
        ((oob_data.is_valid)
             ? createClassicOobDataObject(sCallbackEnv.get(), oob_data)
             : nullptr));
  } else if (transport == TRANSPORT_LE) {
    sCallbackEnv->CallVoidMethod(
        sJniCallbacksObj, method_oobDataReceivedCallback, (jint)transport,
        ((oob_data.is_valid)
             ? createLeOobDataObject(sCallbackEnv.get(), oob_data)
             : nullptr));
  } else {
    // TRANSPORT_AUTO is a concept, however, the host stack doesn't fully
    // implement it So passing it from the java layer is currently useless until
+0 −9
Original line number Diff line number Diff line
@@ -1600,15 +1600,6 @@ public class AdapterService extends Service {
                return;
            }
            enforceBluetoothPrivilegedPermission(service);
            if (transport == BluetoothDevice.TRANSPORT_LE) {
                // TODO(184377951): LE isn't yet supported, coming soon
                try {
                    callback.onError(BluetoothAdapter.OOB_ERROR_UNKNOWN);
                } catch (RemoteException e) {
                    Log.e(TAG, "Failed to call callback");
                }
                return;
            }
            service.generateLocalOobData(transport, callback);
        }