Fix locking in DeviceIdleController.

1. There were several instances where we weren't appropriately locking
   around instance variables when accessing or changing them. Add the
   appropriate locking.
2. Annotate lock requirements around variables

Bug: 199191752
Test: atest DeviceIdleTest
Test: atest FrameworksMockingServicesTests:DeviceIdleControllerTest
Change-Id: I392da8081afe89a46d0776e634347e67c24ee5e2
1 file changed