OSDN Git Service

Allow the Bluetooth MAC address to be updated asynchronously (3/3)
authorStanley Tng <stng@google.com>
Tue, 18 Apr 2017 05:38:38 +0000 (22:38 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 21 Apr 2017 22:20:41 +0000 (22:20 +0000)
commit514274c60b52425c09d62d2afb1546707c9d8ab1
tree6c5dc91fcf5749b4d85204a0d17764ce360ee50d
parent22d3abd790110ddd0bf5bb67a729b44ac53f0813
Allow the Bluetooth MAC address to be updated asynchronously (3/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: I7b1c526ee227897c003ac921078f317f96b92604
(cherry picked from commit 7dc0525365025e17e289869288b1b7d5146306cc)
btif/src/btif_core.cc
btif/src/btif_storage.cc