Fix logical error in UID idle/active handling

There is a bug where the sensor is not properly deactivated
when ann app becomes idle. This CL fixes the issue, and also
avoids calling batch() if no active clients exist.

Bug: 157934995
Test: Flash, verify sensor is disabled when app goes idle
and re-enabled when app becomes active again

Change-Id: I403b02a20dc89c5ce0630de6ddfd6242bf38ec37
1 file changed