Resolve boot time dependencies related to the power manager.
This change fixes a bug where native daemons may try to communicate with the power manager before it was fully initialized due to a race between publishing the binder service and completing init(). The solution was to simplify the dependencies related to the power manager. It turns out that most services that were passed in init are not actually needed until systemReady. What remained was a dependency on the activity manager to check permissions for incoming calls. So now we start activity manager first. However, the activity manager also depends on power manager for wakelocks. To break the cycle, we now defer initializing the activity manager's wakelocks until after the power manager has been started. Cleaned up a bunch of boot-time service dependencies so that we can have better confidence that they are correctly maintained. Bug: 13884219 Change-Id: If08e2d7ccd44e7026a72441bb6bd5afd7bb9fffe
Loading
Please register or sign in to comment