#include <glib.h>
+#ifdef ANDROID_EXPAND_NAME
+#include <cutils/properties.h>
+#endif
+
#include <dbus/dbus.h>
#include "hcid.h"
register int sp, np, olen;
char *opt, buf[10];
+#ifdef ANDROID_EXPAND_NAME
+ char value[PROPERTY_VALUE_MAX];
+#endif
+
if (!str && !dst)
return NULL;
opt = hcid.host_name;
break;
+#ifdef ANDROID_EXPAND_NAME
+ case 'b':
+ property_get("ro.product.brand", value, "");
+ opt = value;
+ break;
+
+ case 'm':
+ property_get("ro.product.model", value, "");
+ opt = value;
+ break;
+
+ case 'n':
+ property_get("ro.product.name", value, "");
+ opt = value;
+ break;
+#endif
+
case '%':
dst[np++] = str[sp++];
/* fall through */
int opt, daemonize = 1, debug = 0, sdp = 1, experimental = 0;
GKeyFile *config;
+#ifdef ANDROID_SET_AID_AND_CAP
+ /* Unfortunately Android's init.rc does not yet support applying
+ * capabilities. So we must do it in-process. */
+ void *android_set_aid_and_cap(void);
+ android_set_aid_and_cap();
+#endif
+
/* Default HCId settings */
memset(&hcid, 0, sizeof(hcid));
hcid.auto_init = 1;
* the plugins might wanna expose some paths on the bus. However the
* best order of how to init various subsystems of the Bluetooth
* daemon needs to be re-worked. */
+#if 0
plugin_init(config);
+#endif
init_security_data();
hcid_dbus_unregister();
+#if 0
plugin_cleanup();
+#endif
stop_sdp_server();