summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorChiachang Wang <chiachangwang@google.com>2021-04-08 09:44:12 +0800
committerChiachang Wang <chiachangwang@google.com>2021-04-08 09:44:12 +0800
commit221e2c77adef0e481aa6006bb991adb835956836 (patch)
tree60818f2a6452f47289fa1d9d8929778b838f36b8 /core/java/android
parented4117ff40c7185d5a1005ae36242a294a5f2d12 (diff)
Remove throws RuntimeException from APIs
As API review feedback, the information provides no value to a user. Remove it from BatteryStatsManager#reportWifiRadioPowerState and BatteryStatsManager#reportMobileRadioPowerState. Fix: 184735838 Test: make update-api Change-Id: I8cce6523695ba58654cbe5d1db79045eeb46d913
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/os/BatteryStatsManager.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/core/java/android/os/BatteryStatsManager.java b/core/java/android/os/BatteryStatsManager.java
index 3f4a21878687..f5172cf0fb69 100644
--- a/core/java/android/os/BatteryStatsManager.java
+++ b/core/java/android/os/BatteryStatsManager.java
@@ -386,10 +386,9 @@ public final class BatteryStatsManager {
* @param uid Uid of this event. For the active state it represents the uid that was responsible
* for waking the radio, or -1 if the system was responsible for waking the radio.
* For inactive state, the UID should always be -1.
- * @throws RuntimeException if there are binder remote-invocation errors.
*/
@RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
- public void reportMobileRadioPowerState(boolean isActive, int uid) throws RuntimeException {
+ public void reportMobileRadioPowerState(boolean isActive, int uid) {
try {
mBatteryStats.noteMobileRadioPowerState(getDataConnectionPowerState(isActive),
SystemClock.elapsedRealtimeNanos(), uid);
@@ -405,10 +404,9 @@ public final class BatteryStatsManager {
* @param uid Uid of this event. For the active state it represents the uid that was responsible
* for waking the radio, or -1 if the system was responsible for waking the radio.
* For inactive state, the UID should always be -1.
- * @throws RuntimeException if there are binder remote-invocation errors.
*/
@RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
- public void reportWifiRadioPowerState(boolean isActive, int uid) throws RuntimeException {
+ public void reportWifiRadioPowerState(boolean isActive, int uid) {
try {
mBatteryStats.noteWifiRadioPowerState(getDataConnectionPowerState(isActive),
SystemClock.elapsedRealtimeNanos(), uid);