OSDN Git Service

Allow the Bluetooth MAC address to be updated asynchronously (1/3)
authorStanley Tng <stng@google.com>
Tue, 18 Apr 2017 05:33:21 +0000 (22:33 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 21 Apr 2017 22:20:31 +0000 (22:20 +0000)
commit30ab34382e41956c87be2f1632249b2f8a4da577
treec32e7d45fd3d431696d5f4d2371f4450ea390711
parent33da1927a72bf3b170b4f7c6f9cc386824427e72
Allow the Bluetooth MAC address to be updated asynchronously (1/3)

There are intermittent issues where either the returned Bluetooth
MAC address to Java framework is uninitialized or this address update
arrives too late. This fix will do 2 things:
(1) Returns error when MAC address is unavailable in the native code.
(2) Updates the MAC address later by adding a new broadcast event.

Test: Check address for these cases: factory reset, system reboot, and
Bluetooth re-enable.
Bug: 36709382

Change-Id: I6b71100c2c03c6f365f0dbc27d4e37c734145e30
(cherry picked from commit 6d5da5e7ffb69614706ca030bfe194a493b24e99)
src/com/android/bluetooth/btservice/AdapterProperties.java