From 6eb830a8616b79b019f0042f56d86338505e4ef1 Mon Sep 17 00:00:00 2001 From: Rubin Xu Date: Wed, 5 Apr 2023 14:28:02 +0100 Subject: [PATCH] Update javadoc for security log APIs Mentions the delegated apps should call them with null passed in as the admin ComponentName. Bug: 261855657 Test: builds Change-Id: I408dc2835580f18ba90544daf1aec7f29587711e --- core/java/android/app/admin/DevicePolicyManager.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index bad6c77a17f32..ffc661638eb82 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -13646,8 +13646,8 @@ public class DevicePolicyManager { * privacy-sensitive events happening outside the managed profile would have been redacted * already. * - * @param admin Which device admin this request is associated with. Null if the caller is not - * a device admin + * @param admin Which device admin this request is associated with, or {@code null} + * if called by a delegated app. * @param enabled whether security logging should be enabled or not. * @throws SecurityException if the caller is not permitted to control security logging. * @see #setAffiliationIds @@ -13699,8 +13699,8 @@ public class DevicePolicyManager { * it must be affiliated with the device. Otherwise a {@link SecurityException} will be thrown. * See {@link #isAffiliatedUser}. * - * @param admin Which device admin this request is associated with. Null if the caller is not - * a device admin. + * @param admin Which device admin this request is associated with, or {@code null} + * if called by a delegated app. * @return the new batch of security logs which is a list of {@link SecurityEvent}, * or {@code null} if rate limitation is exceeded or if logging is currently disabled. * @throws SecurityException if the caller is not allowed to access security logging, @@ -13857,8 +13857,8 @@ public class DevicePolicyManager { * it must be affiliated with the device. Otherwise a {@link SecurityException} will be thrown. * See {@link #isAffiliatedUser}. * - * @param admin Which device admin this request is associated with. Null if the caller is not - * a device admin. + * @param admin Which device admin this request is associated with, or {@code null} + * if called by a delegated app. * @return Device logs from before the latest reboot of the system, or {@code null} if this API * is not supported on the device. * @throws SecurityException if the caller is not allowed to access security logging, or