Fix typo in sensor privacy init

Should be getting the value at index i, not using int i as a key. Also
when iterating over the state we should be holding the lock.

Test: Push sensor_privacy.xml file and reboot
Fixes: 185881144
Change-Id: I09823d888b05b674b32254d39ab030ce0e6c2acf
(cherry picked from commit 30a3a67dad3ae348c47f33976d36bdd28e322efe)
1 file changed