Fix reboot-on-shutdown issue with the new camera module

Since the introduction of Android N on FP2 devices equipped
with the new camera module, when an user tries to shutdown the device
it starts the power-off procedure but reboots before finishing.
This makes it impossible to turn off the phone and,
as a side effect, even to encrypt the device.

The encryption issue has been present also on Android M.

This commit fixes that issue, probably caused by a race condition
on shared access on CCI bus.

Issue: FP2N-133
Issue: FP2N-269
Test: 'cts-tradefed run cts -m CtsCameraTestCases'
Change-Id: I3c38822e052303b98169a09ddd90a7ac885f8b2c
2 files changed