diff options
| author | 2024-01-19 17:10:22 +0000 | |
|---|---|---|
| committer | 2024-01-19 17:10:22 +0000 | |
| commit | a44531d9c0104bc81f5f9a1c75cb5c99df5257b7 (patch) | |
| tree | b96acf4553f570508931ef8ca71de49323a694cd | |
| parent | 3c6cbd421f89e1700337077d3d52ced0f52a3096 (diff) | |
| parent | b1899ca66d21595e3f73913f79f54480fcb4418f (diff) | |
Merge "Update the javadoc of the ActivityManager#addOnUidImportanceListener()" into main
| -rw-r--r-- | core/java/android/app/ActivityManager.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java index 5318bb722b5f..b2c64756e4bf 100644 --- a/core/java/android/app/ActivityManager.java +++ b/core/java/android/app/ActivityManager.java @@ -4413,6 +4413,10 @@ public class ActivityManager { * <p>The caller must hold the {@link android.Manifest.permission#PACKAGE_USAGE_STATS} * permission to use this feature.</p> * + * <p>Calling this API with the same instance of {@code listener} without + * unregistering with {@link #removeOnUidImportanceListener} before it will result in + * an {@link IllegalArgumentException}.</p> + * * @throws IllegalArgumentException If the listener is already registered. * @throws SecurityException If the caller does not hold * {@link android.Manifest.permission#PACKAGE_USAGE_STATS}. @@ -4438,6 +4442,10 @@ public class ActivityManager { * all UIDs will be monitored by this listener, this will be equivalent to the * {@link #addOnUidImportanceListener(OnUidImportanceListener, int)} in this case. * + * <p>Calling this API with the same instance of {@code listener} without + * unregistering with {@link #removeOnUidImportanceListener} before it will result in + * an {@link IllegalArgumentException}.</p> + * * @throws IllegalArgumentException If the listener is already registered. * @hide */ |