Wei Wang b661bb7958 Fix race condition for BluetoothLeScanner.
Root cause of the issue:
Client registeration was done on caller's thread, while
onClientRegistered was called from binder thread. There is a slight
chance that onClientRegistered was called before registerClient
returned, causing a premature notifyAll before wait was called.

By forcing acquiring the same lock now it's guaranteed wait would
happen before onClientRegistered callback was executed.

Bug: 16707401
Change-Id: Ic60adec475085741d14ecd2d2bb462246f88da58
2014-08-19 10:46:52 -07:00
..
2014-08-15 22:03:24 -07:00