summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhomart Mukhamejanov <zhomart@google.com>2021-04-02 12:50:56 -0700
committerZhomart Mukhamejanov <zhomart@google.com>2021-04-02 12:59:27 -0700
commit2203651b97450cae1823a8dc27564ddbbc9f6ec2 (patch)
treeb17f7e46cb5b476a2f2c52069d99e9c2c7c98a31
parent2d9e23f94f9917a8d98faeae15136041a9131755 (diff)
downloadinterfaces-2203651b97450cae1823a8dc27564ddbbc9f6ec2.tar.gz
Add @throws to PowerPolicy aidl docs
Bug: 181079481 Test: n/a Change-Id: I8a338e20771a85f603f66d2497cbff3448dba8e4
-rw-r--r--automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/ICarPowerPolicyServer.aidl5
-rw-r--r--automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/internal/ICarPowerPolicySystemNotification.aidl5
2 files changed, 10 insertions, 0 deletions
diff --git a/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/ICarPowerPolicyServer.aidl b/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/ICarPowerPolicyServer.aidl
index 2ff4fa9..27b18f7 100644
--- a/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/ICarPowerPolicyServer.aidl
+++ b/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/ICarPowerPolicyServer.aidl
@@ -32,6 +32,7 @@ import android.frameworks.automotive.powerpolicy.PowerComponent;
interface ICarPowerPolicyServer {
/**
* Gets the current power policy.
+ * @throws IllegalStateException if the current policy is not set.
*/
CarPowerPolicy getCurrentPowerPolicy();
@@ -40,6 +41,7 @@ interface ICarPowerPolicyServer {
*
* @param componentId Power component ID defined in PowerComponent.aidl to check power state.
* @return True if the component's power state is on.
+ * @throws IllegalArgumentException if the componentId is invalid.
*/
boolean getPowerComponentState(in PowerComponent componentId);
@@ -50,6 +52,8 @@ interface ICarPowerPolicyServer {
*
* @param callback Callback that is invoked when the power policy changes.
* @param filter The list of components which the callback is interested in.
+ * @throws IllegalArgumentException if the callback is already registered.
+ * @throws IllegalStateException if the callback is dead.
*/
void registerPowerPolicyChangeCallback(in ICarPowerPolicyChangeCallback callback,
in CarPowerPolicyFilter filter);
@@ -58,6 +62,7 @@ interface ICarPowerPolicyServer {
* Unsubscribes from power policy change.
*
* @param callback Callback that doesn't want to receive power policy change.
+ * @throws IllegalArgumentException if the callback is not registered.
*/
void unregisterPowerPolicyChangeCallback(in ICarPowerPolicyChangeCallback callback);
}
diff --git a/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/internal/ICarPowerPolicySystemNotification.aidl b/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/internal/ICarPowerPolicySystemNotification.aidl
index 2f43f85..08078f0 100644
--- a/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/internal/ICarPowerPolicySystemNotification.aidl
+++ b/automotive/powerpolicy/aidl/android/frameworks/automotive/powerpolicy/internal/ICarPowerPolicySystemNotification.aidl
@@ -36,6 +36,7 @@ interface ICarPowerPolicySystemNotification {
* System private API for CarService.
*
* @return The current power policy ID and power policy group ID.
+ * @throws SecurityException if the caller doesn't have sufficient permissions.
*/
PolicyState notifyCarServiceReady();
@@ -46,6 +47,8 @@ interface ICarPowerPolicySystemNotification {
* System private API for CarService.
*
* @param policyId The current policy ID.
+ * @throws IllegalStateException if it fails to notify power policy change.
+ * @throws SecurityException if the caller doesn't have sufficient permissions.
*/
void notifyPowerPolicyChange(in @utf8InCpp String policyId);
@@ -60,6 +63,8 @@ interface ICarPowerPolicySystemNotification {
* @param policyId The new policy ID.
* @param enabledComponents List of components to be enabled.
* @param disabledComponents List of components to be disabled.
+ * @throws IllegalStateException if it fails to notify power policy definition.
+ * @throws SecurityException if the caller doesn't have sufficient permissions.
*/
void notifyPowerPolicyDefinition(in @utf8InCpp String policyId,
in @utf8InCpp String[] enabledComponents, in @utf8InCpp String[] disabledComponents);