Loading system/service/ipc/binder/IBluetooth.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ namespace ipc { namespace binder { // static const char IBluetooth::kBluetoothServiceName[] = "bluetoothservice"; const char IBluetooth::kBluetoothServiceName[] = "bluetooth-service"; // static android::sp<IBluetooth> IBluetooth::getClientInterface() { Loading Loading @@ -97,7 +97,7 @@ android::status_t BnBluetooth::onTransact( } case GET_UUIDS_TRANSACTION: // TODO(armansito): Figure out how to handle a Java "ParcelUuid" natively. // Should we just change the code to pass strings or byte arrays? // (see http://b/23316698). return android::INVALID_OPERATION; case SET_NAME_TRANSACTION: { Loading Loading @@ -179,7 +179,8 @@ std::string BpBluetooth::GetAddress() { } std::vector<bluetooth::UUID> BpBluetooth::GetUUIDs() { // TODO(armansito): Figure out what to do here. // TODO(armansito): need to deserialize a parceled java.util.ParcelUUID[] to // std::vector<bluetooth::UUID> here (see http://b/23316698). return std::vector<bluetooth::UUID>(); } Loading system/service/ipc/binder/IBluetooth.h +70 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ namespace binder { // This class defines the Binder IPC interface for accessing the Bluetooth // service. This class was written based on the corresponding AIDL file at // /frameworks/base/core/java/android/bluetooth/IBluetooth.aidl. // // NOTE: KEEP THIS FILE UP-TO-DATE with the corresponding AIDL, otherwise this // won't be compatible with the Android framework. class IBluetooth : public android::IInterface { public: DECLARE_META_INTERFACE(Bluetooth); Loading @@ -44,10 +47,76 @@ class IBluetooth : public android::IInterface { ENABLE_TRANSACTION, ENABLE_NO_AUTO_CONNECT_TRANSACTION, DISABLE_TRANSACTION, GET_ADDRESS_TRANSACTION, GET_UUIDS_TRANSACTION, GET_UUIDS_TRANSACTION, // TODO(armansito): Support this SET_NAME_TRANSACTION, GET_NAME_TRANSACTION, // TODO(armansito): Support the functions below. GET_SCAN_MODE_TRANSACTION, SET_SCAN_MODE_TRANSACTION, GET_DISCOVERABLE_TIMEOUT_TRANSACTION, SET_DISCOVERABLE_TIMEOUT_TRANSACTION, START_DISCOVERY_TRANSACTION, CANCEL_DISCOVERY_TRANSACTION, IS_DISCOVERING_TRANSACTION, GET_ADAPTER_CONNECTION_STATE_TRANSACTION, GET_PROFILE_CONNECTION_STATE_TRANSACTION, GET_BONDED_DEVICES_TRANSACTION, CREATE_BOND_TRANSACTION, CANCEL_BOND_PROCESS_TRANSACTION, REMOVE_BOND_TRANSACTION, GET_BOND_STATE_TRANSACTION, GET_CONNECTION_STATE_TRANSACTION, GET_REMOTE_NAME_TRANSACTION, GET_REMOTE_TYPE_TRANSACTION, GET_REMOTE_ALIAS_TRANSACTION, SET_REMOTE_ALIAS_TRANSACTION, GET_REMOTE_CLASS_TRANSACTION, GET_REMOTE_UUIDS_TRANSACTION, FETCH_REMOTE_UUIDS_TRANSACTION, SDP_SEARCH_TRANSACTION, SET_PIN_TRANSACTION, SET_PASSKEY_TRANSACTION, SET_PAIRING_CONFIRMATION_TRANSACTION, GET_PHONEBOOK_ACCESS_PERMISSION_TRANSACTION, SET_PHONEBOOK_ACCESS_PERMISSION_TRANSACTION, GET_MESSAGE_ACCESS_PERMISSION_TRANSACTION, SET_MESSAGE_ACCESS_PERMISSION_TRANSACTION, GET_SIM_ACCESS_PERMISSION_TRANSACTION, SET_SIM_ACCESS_PERMISSION_TRANSACTION, SEND_CONNECTION_STATE_CHANGE_TRANSACTION, REGISTER_CALLBACK_TRANSACTION, UNREGISTER_CALLBACK_TRANSACTION, CONNECT_SOCKET_TRANSACTION, CREATE_SOCKET_CHANNEL_TRANSACTION, CONFIG_HCI_SNOOP_LOG, FACTORY_RESET_TRANSACTION, IS_MULTI_ADVERTISEMENT_SUPPORTED_TRANSACTION, IS_PERIPHERAL_MODE_SUPPORTED_TRANSACTION, IS_OFFLOADED_FILTERING_SUPPORTED_TRANSACTION, IS_OFFLOADED_SCAN_BATCHING_SUPPORTED_TRANSACTION, IS_ACTIVITY_AND_ENERGY_REPORTING_SUPPORTED_TRANSACTION, GET_ACTIVITY_ENERGY_INFO_FROM_CONTROLLER_TRANSACTION, REPORT_ACTIVITY_INFO_TRANSACTION, DUMP_TRANSACTION, ON_LE_SERVICE_UP_TRANSACTION, ON_BR_EDR_DOWN_TRANSACTION, }; // Returns a handle to the IBluetooth Binder from the Android ServiceManager. Loading Loading
system/service/ipc/binder/IBluetooth.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ namespace ipc { namespace binder { // static const char IBluetooth::kBluetoothServiceName[] = "bluetoothservice"; const char IBluetooth::kBluetoothServiceName[] = "bluetooth-service"; // static android::sp<IBluetooth> IBluetooth::getClientInterface() { Loading Loading @@ -97,7 +97,7 @@ android::status_t BnBluetooth::onTransact( } case GET_UUIDS_TRANSACTION: // TODO(armansito): Figure out how to handle a Java "ParcelUuid" natively. // Should we just change the code to pass strings or byte arrays? // (see http://b/23316698). return android::INVALID_OPERATION; case SET_NAME_TRANSACTION: { Loading Loading @@ -179,7 +179,8 @@ std::string BpBluetooth::GetAddress() { } std::vector<bluetooth::UUID> BpBluetooth::GetUUIDs() { // TODO(armansito): Figure out what to do here. // TODO(armansito): need to deserialize a parceled java.util.ParcelUUID[] to // std::vector<bluetooth::UUID> here (see http://b/23316698). return std::vector<bluetooth::UUID>(); } Loading
system/service/ipc/binder/IBluetooth.h +70 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ namespace binder { // This class defines the Binder IPC interface for accessing the Bluetooth // service. This class was written based on the corresponding AIDL file at // /frameworks/base/core/java/android/bluetooth/IBluetooth.aidl. // // NOTE: KEEP THIS FILE UP-TO-DATE with the corresponding AIDL, otherwise this // won't be compatible with the Android framework. class IBluetooth : public android::IInterface { public: DECLARE_META_INTERFACE(Bluetooth); Loading @@ -44,10 +47,76 @@ class IBluetooth : public android::IInterface { ENABLE_TRANSACTION, ENABLE_NO_AUTO_CONNECT_TRANSACTION, DISABLE_TRANSACTION, GET_ADDRESS_TRANSACTION, GET_UUIDS_TRANSACTION, GET_UUIDS_TRANSACTION, // TODO(armansito): Support this SET_NAME_TRANSACTION, GET_NAME_TRANSACTION, // TODO(armansito): Support the functions below. GET_SCAN_MODE_TRANSACTION, SET_SCAN_MODE_TRANSACTION, GET_DISCOVERABLE_TIMEOUT_TRANSACTION, SET_DISCOVERABLE_TIMEOUT_TRANSACTION, START_DISCOVERY_TRANSACTION, CANCEL_DISCOVERY_TRANSACTION, IS_DISCOVERING_TRANSACTION, GET_ADAPTER_CONNECTION_STATE_TRANSACTION, GET_PROFILE_CONNECTION_STATE_TRANSACTION, GET_BONDED_DEVICES_TRANSACTION, CREATE_BOND_TRANSACTION, CANCEL_BOND_PROCESS_TRANSACTION, REMOVE_BOND_TRANSACTION, GET_BOND_STATE_TRANSACTION, GET_CONNECTION_STATE_TRANSACTION, GET_REMOTE_NAME_TRANSACTION, GET_REMOTE_TYPE_TRANSACTION, GET_REMOTE_ALIAS_TRANSACTION, SET_REMOTE_ALIAS_TRANSACTION, GET_REMOTE_CLASS_TRANSACTION, GET_REMOTE_UUIDS_TRANSACTION, FETCH_REMOTE_UUIDS_TRANSACTION, SDP_SEARCH_TRANSACTION, SET_PIN_TRANSACTION, SET_PASSKEY_TRANSACTION, SET_PAIRING_CONFIRMATION_TRANSACTION, GET_PHONEBOOK_ACCESS_PERMISSION_TRANSACTION, SET_PHONEBOOK_ACCESS_PERMISSION_TRANSACTION, GET_MESSAGE_ACCESS_PERMISSION_TRANSACTION, SET_MESSAGE_ACCESS_PERMISSION_TRANSACTION, GET_SIM_ACCESS_PERMISSION_TRANSACTION, SET_SIM_ACCESS_PERMISSION_TRANSACTION, SEND_CONNECTION_STATE_CHANGE_TRANSACTION, REGISTER_CALLBACK_TRANSACTION, UNREGISTER_CALLBACK_TRANSACTION, CONNECT_SOCKET_TRANSACTION, CREATE_SOCKET_CHANNEL_TRANSACTION, CONFIG_HCI_SNOOP_LOG, FACTORY_RESET_TRANSACTION, IS_MULTI_ADVERTISEMENT_SUPPORTED_TRANSACTION, IS_PERIPHERAL_MODE_SUPPORTED_TRANSACTION, IS_OFFLOADED_FILTERING_SUPPORTED_TRANSACTION, IS_OFFLOADED_SCAN_BATCHING_SUPPORTED_TRANSACTION, IS_ACTIVITY_AND_ENERGY_REPORTING_SUPPORTED_TRANSACTION, GET_ACTIVITY_ENERGY_INFO_FROM_CONTROLLER_TRANSACTION, REPORT_ACTIVITY_INFO_TRANSACTION, DUMP_TRANSACTION, ON_LE_SERVICE_UP_TRANSACTION, ON_BR_EDR_DOWN_TRANSACTION, }; // Returns a handle to the IBluetooth Binder from the Android ServiceManager. Loading