summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-09-24 18:15:39 -0700
committerJean-Baptiste Queru <jbq@google.com>2010-09-24 18:17:12 -0700
commitdbd368991702c5ad1786a1b4412b881b4605af32 (patch)
treedfc06520383b2ec5c3ca16b9f4f2eb99d17aed21
parent96d4ccee4fd69a95d8a75c14df8f5baa6b31aa4d (diff)
downloaddevice_samsung_crespo-dbd368991702c5ad1786a1b4412b881b4605af32.zip
device_samsung_crespo-dbd368991702c5ad1786a1b4412b881b4605af32.tar.gz
device_samsung_crespo-dbd368991702c5ad1786a1b4412b881b4605af32.tar.bz2
Create a stub for libsecril-client
This allows to build libaudio even if we don't have the true libsecril-client Change-Id: I3f8c8aa975a96a144157505272cf9a4497bef196
-rwxr-xr-xBoardConfig.mk4
-rw-r--r--libaudio/Android.mk9
-rw-r--r--libaudio/secril_stub.c49
3 files changed, 61 insertions, 1 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 3bdb1c7..e9ff626 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -18,7 +18,9 @@
#
# Set this up here so that BoardVendorConfig.mk can override it
-BOARD_USES_GENERIC_AUDIO := true
+BOARD_USES_GENERIC_AUDIO := false
+
+BOARD_USES_LIBSECRIL_STUB := true
# Use the non-open-source parts, if they're present
-include vendor/samsung/crespo/BoardConfigVendor.mk
diff --git a/libaudio/Android.mk b/libaudio/Android.mk
index 790f63c..4230fb2 100644
--- a/libaudio/Android.mk
+++ b/libaudio/Android.mk
@@ -78,6 +78,15 @@ endif
include $(BUILD_SHARED_LIBRARY)
+ifeq ($(BOARD_USES_LIBSECRIL_STUB),true)
+# A stub to replace libsecril-client at build time
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := secril_stub.c
+LOCAL_MODULE := libsecril-client
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SHARED_LIBRARY)
+endif
+
endif
endif
endif
diff --git a/libaudio/secril_stub.c b/libaudio/secril_stub.c
new file mode 100644
index 0000000..0098804
--- /dev/null
+++ b/libaudio/secril_stub.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "secril-client.h"
+
+int isConnected_RILD(HRilClient client) {
+ return 0;
+}
+
+int Connect_RILD(HRilClient client) {
+ return 0;
+}
+
+int InvokeOemRequestHookRaw(HRilClient client, char *data, size_t len) {
+ return 0;
+}
+
+int RegisterRequestCompleteHandler(HRilClient client, uint32_t id, RilOnComplete handler) {
+ return 0;
+}
+
+int RegisterUnsolicitedHandler(HRilClient client, uint32_t id, RilOnUnsolicited handler) {
+ return 0;
+}
+
+int Disconnect_RILD(HRilClient client) {
+ return 0;
+}
+
+int CloseClient_RILD(HRilClient client) {
+ return 0;
+}
+
+HRilClient OpenClient_RILD(void) {
+ return 0;
+}