Android Lessions Part 1: Bluetooth Crash January 4, 2012Posted by Florian in Android, Source.
add a comment
Finally – some free days for family and friends and to write a few lines which might be useful for someone else. Since Android started to become more and more interesting for industrial and business applications I got involved in some projects porting Android to several devices. It turned out that the documentation of the lower layers (hardware and driver adaptation) is very thin in contrast to the SDK and NDK documentation. But I took some notes working on these projects… this one might be useful for other people porting Android 2.3.x and experiencing issues with Bluetooth.
I ran into the issue that activating Bluetooth in the settings application resulted in a crash of the whole GUI. It seems that only ARMv5 core based devices are affected so that only a few people ran into this so far. (Not that it would be correct on more common cores used for Android devices such as ARMv7A, but it does not seem to cause the same effect.) The solution I found in the Android 4 commit log is quite simple for a problem causing that much of hassle:
@@ -311,7 +311,7 @@ static int register_agent(native_data_t *nat,
DBusMessage *msg, *reply;
- bool oob = TRUE;
+ dbus_bool_t oob = TRUE;