diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-11-11 21:43:26 -0800 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-11-11 21:51:36 -0800 |
commit | c3ce4172e58781e13b80c04c7ae10fb6f9c336d9 (patch) | |
tree | 30d30af827a44111f17c400627a51139668fe105 /service/java/com/android/server/bluetooth/BluetoothService.java | |
parent | 1503c03ba181b5877d28f5cc7893b5adc565c640 (diff) |
Move Bluetooth startup to PHASE_ACTIVITY_MANAGER_READY
For some reason BluetoothManagerService recently has been unable to bind
to the BluetoothService, causing timeouts, which in turn could lead to
Bluetooth not working immediately after boot.
While refactoring that code, the "get name and address" code was also
removed to make the startup sequence more transparent and easier to
debug.
Bug: 25597150
Change-Id: I62ffe4589a76ea8a6db75e3c7599f149db677ea3
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothService.java')
-rw-r--r-- | service/java/com/android/server/bluetooth/BluetoothService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothService.java b/service/java/com/android/server/bluetooth/BluetoothService.java index 73e8c52a3e..019d03df19 100644 --- a/service/java/com/android/server/bluetooth/BluetoothService.java +++ b/service/java/com/android/server/bluetooth/BluetoothService.java @@ -31,14 +31,15 @@ class BluetoothService extends SystemService { @Override public void onStart() { - Log.d(TAG, "onStart: publishing BluetoothManagerService"); - publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, mBluetoothManagerService); } @Override public void onBootPhase(int phase) { if (phase == SystemService.PHASE_SYSTEM_SERVICES_READY) { Log.d(TAG, "onBootPhase: PHASE_SYSTEM_SERVICES_READY"); + publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, mBluetoothManagerService); + } else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY) { + Log.d(TAG, "onBootPhase: PHASE_ACTIVITY_MANAGER_READY"); mBluetoothManagerService.handleOnBootPhase(); } } |