Refactor property change listener code.

Simplify the if-else conditional statement by converting it into a
switch statement and moving lock aquisition and unlocking outside the
cases.

Bug: 278662935
Test: atest HealthFitnessUnitTests
Change-Id: I7ca0c008299d13b2a3de599603cc8cb8f00d49fc
(cherry picked from commit 5b15248388926fa92458d4559de4da939c7d0fb9)
1 file changed