RecoverySystem: Fix the issue in installPackage().
Commit
794c8b0b3fe16051843c22232d58d6b184dde49b fixed the race condition
when requesting data wipes via uncrypt. We have similar issue with
RecoverySystem.installPackage(). It first requests to set up the BCB,
then triggers a reboot. These two steps should finish atomically.
This CL switches to calling
RecoverySystemService.rebootRecoveryWithCommand(), which guards the two
steps with synchronized blocks.
Bug:
34239871
Test: Having two apps: one calls RecoverySystem.cancelScheduledUpdate()
continuously, and the other calls RecoverySystem.installPackage()
just once. The install request should not be cancelled by the
other.
Change-Id: I5ec56fcaa70eae7c33e3cc8e6cfc7472b935ce4e