WifiUsabilityStatsEntry: Throw exception if duty cyle not present

If the device is running an old HAL (or the value is not populated by
the HAL for some reason), throw NoSuchElementException to indicate that
we don't have a valid value.
We could alternatively, change the IntRange to include -1, but that
seems ugly.

Bug: 181809456
Test: atest android.net.wifi
Change-Id: I6e5d840c1afe35ed6d4e5ac4776dc667ea9d47e7
2 files changed