Skip to content
Commit 344555b0 authored by Ram Periathiruvadi's avatar Ram Periathiruvadi
Browse files

Fix Handling of user switching for headless user 0 model.

For headless user 0 models we don't start Bluetooth Service in user 0.
We wait for the first user switch to start - call
BluetoothManagerService.handleBootPhase().  However, we also call
BluetoothManagerService.handleOnUserSwitch() which ends up restarting
the service that was started in handleBootPhase().  This leads to the
Bluetooth service not being available due to the extra restart.

Changing the loigc to
1. Handle boot phase on User switch if not done before.
2. Handle on switch user otherwise.

This saves 6-7 seconds of the time it takes for something like BLE to be
available in the automotive builds.

Bug: 137289703
Test: Make sure Bluetooth comes up only once with no restarts on boot up
and also ensure Bluetooth is restarted when manually switching to
another user.

Change-Id: I30179f4c2a3f81940258c70045a6ba8b32f315e1
(cherry picked from commit 2097d6a3)
parent 5c5a1d06
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment