uwb(service): Implement the new hardware state transitions

if "hw_idle_turn_off_enabled" feature is turned on and UWB is enabled by
the user:
1. When there is zero vote to keep the UWB HW on, UWB hardware is
disabled and notify adapterState = STATE_ENABLED_HW_IDLE
2. When there is non-zero vote to keep the UWB HW on, UWB hardware is
enabled and notify adapterState = STATE_ENABLED_INACTIVE

TODO: Will add more unit tests in "UwbServiceCoreTest" in a follow up CL.

Bug: 322372275
Test: atest UwbManagerTest
Test: atest ServiceUwbTests
Test: Manual
adb shell device_config put uwb hw_idle_turn_off_enabled true
adb shell cmd uwb enable-uwb
adb shell cmd uwb disable-uwb-hw (UWB turns off)
adb shell cmd uwb enable-uwb (UWB remains off)
adb shell cmd uwb enable-uwb-hw (UWB turns on)
adb shell cmd uwb disable-uwb (UWB turns off)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:da4a543a4fc97c1413e2fe19b26bd6c0c4568077)
Merged-In: If10c20b64830967800609d31497169acb687f5a1

Change-Id: If10c20b64830967800609d31497169acb687f5a1
6 files changed