Merge "Switch to throw e.rethrowFromSystemServer()." into rvc-dev
This commit is contained in:
@@ -53,8 +53,7 @@ public class DeviceIdleManager {
|
||||
try {
|
||||
return mService.getSystemPowerWhitelistExceptIdle();
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
return new String[0];
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,8 +65,7 @@ public class DeviceIdleManager {
|
||||
try {
|
||||
return mService.getSystemPowerWhitelist();
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
return new String[0];
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,8 +24,6 @@ import android.annotation.SystemService;
|
||||
import android.annotation.TestApi;
|
||||
import android.content.Context;
|
||||
|
||||
import libcore.util.EmptyArray;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Collections;
|
||||
@@ -97,7 +95,7 @@ public class PowerWhitelistManager {
|
||||
try {
|
||||
mService.addPowerSaveWhitelistApps(packageNames);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,8 +116,7 @@ public class PowerWhitelistManager {
|
||||
return mService.getAppIdWhitelistExceptIdle();
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
return EmptyArray.INT;
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +153,7 @@ public class PowerWhitelistManager {
|
||||
mService.addPowerSaveTempWhitelistApp(packageName, durationMs, mContext.getUserId(),
|
||||
reason);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,8 +183,7 @@ public class PowerWhitelistManager {
|
||||
packageName, mContext.getUserId(), reason);
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
return 0;
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user