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

Commit 8a8a04cc authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

service: use Parcelable instead of helpers

In order to user .aidl in the future, all types will have to be
parcelable. We don't add Parcelable to base types, as they might
be also used with other transports than binder in future.

Change-Id: I88e6961e69ac0e5d04bd4b6fe3cd7d79bd6f73ba
parent 2c299a0b
Loading
Loading
Loading
Loading
+19 −4
Original line number Diff line number Diff line
@@ -59,7 +59,17 @@ btserviceCommonBinderSrc := \
	common/bluetooth/binder/IBluetoothGattServerCallback.cpp \
	common/bluetooth/binder/IBluetoothLowEnergy.cpp \
	common/bluetooth/binder/IBluetoothLowEnergyCallback.cpp \
	common/bluetooth/binder/parcel_helpers.cpp
	common/android/bluetooth/advertise_data.cpp \
	common/android/bluetooth/advertise_settings.cpp \
	common/android/bluetooth/gatt_identifier.cpp \
	common/android/bluetooth/scan_filter.cpp \
	common/android/bluetooth/scan_result.cpp \
	common/android/bluetooth/scan_settings.cpp \
	common/android/bluetooth/uuid.cpp \

btserviceCommonAidlInclude := \
	packages/modules/Bluetooth/system/service/common \
	frameworks/native/aidl/binder

btserviceDaemonSrc := \
	adapter.cpp \
@@ -116,11 +126,12 @@ btserviceBaseTestSrc := \
# ========================================================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
	$(btserviceBinderDaemonSrc) \
	$(btserviceCommonSrc) \
	$(btserviceBinderDaemonSrc) \
	$(btserviceLinuxSrc) \
	$(btserviceDaemonSrc) \
	main.cpp
LOCAL_AIDL_INCLUDES = $(btserviceCommonAidlInclude)
LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := bluetoothtbd
@@ -178,11 +189,14 @@ include $(BUILD_HOST_NATIVE_TEST)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
	$(btserviceBaseTestSrc) \
	$(btserviceBinderDaemonSrc) \
	$(btserviceCommonSrc) \
	$(btserviceBinderDaemonSrc) \
	$(btserviceDaemonSrc) \
	test/main.cpp \
	test/parcel_helpers_unittest.cpp
	test/parcelable_unittest.cpp \
	test/ParcelableTest.aidl
LOCAL_AIDL_INCLUDES := $(btserviceCommonAidlInclude)
LOCAL_AIDL_INCLUDES += ./
LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
LOCAL_MODULE_TAGS := debug tests
LOCAL_MODULE := bluetoothtbd_test
@@ -205,6 +219,7 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
	$(btserviceCommonSrc) \
	$(btserviceCommonBinderSrc)
LOCAL_AIDL_INCLUDES := $(btserviceCommonAidlInclude)
LOCAL_C_INCLUDES += $(btserviceCommonIncludes)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/common
LOCAL_MODULE := libbluetooth-client
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

parcelable AdvertiseData cpp_header "android/bluetooth/advertise_data.h";
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

parcelable AdvertiseSettings cpp_header "android/bluetooth/advertise_settings.h";
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

parcelable GattIdentifier cpp_header "android/bluetooth/gatt_identifier.h";
+19 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.bluetooth;

parcelable ScanFilter cpp_header "android/bluetooth/scan_filter.h";
 No newline at end of file
Loading