Adapter: re-order init to prevent null exception
As soon as the callback are registered, the adapter can be notified. There is a thin possibility that the bluetooth is being started at the same time which would result in the callback being called before the initialization is completed. Since the initialization is only creating local variable except for the registration, moving the registration to be the last init action would solve this. Note that this require a very fast callback call and a very slow init altogether with a precise timing. None of that are expect on a normal journey Bug: 376735216 Fix: 376735216 Test: m . Flag: Exempt, trivial fix Change-Id: I6029fb30a7c4bf3be6d10b743684b6bbc41b5cb1
Loading
Please register or sign in to comment