summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michal Karpinski <mkarpinski@google.com> 2016-03-01 15:57:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-01 15:57:44 +0000
commit8fc5462ee1f9b8e5b13d13b0920433b340fa6b6c (patch)
tree72bc3c104a8fd70df5772f8fb9012beb915a0cb5
parenteba8f47c6e47b2a744122b9321e4dcf8f56939a5 (diff)
parentb58e4966db1c9bd3d0567ef613e8cb8f80e8e85e (diff)
Merge "Adding SecurityException information to all device logging DPM public methods" into nyc-dev
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 74fe13ac1961..6e29eaab26d0 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -2921,7 +2921,7 @@ public class DevicePolicyManager {
* Called by a device owner to request a bugreport.
*
* <p>There must be only one user on the device, managed by the device owner.
- * Otherwise a security exception will be thrown.
+ * Otherwise a {@link SecurityException} will be thrown.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with.
* @return {@code true} if the bugreport collection started successfully, or {@code false}
@@ -5686,6 +5686,9 @@ public class DevicePolicyManager {
* <p> Device logs contain various information intended for security auditing purposes.
* See {@link SecurityEvent} for details.
*
+ * <p>There must be only one user on the device, managed by the device owner.
+ * Otherwise a {@link SecurityException} will be thrown.
+ *
* @param admin Which device owner this request is associated with.
* @param enabled whether device logging should be enabled or not.
* @see #retrieveDeviceLogs
@@ -5701,6 +5704,9 @@ public class DevicePolicyManager {
/**
* Return whether device logging is enabled or not by the device owner.
*
+ * <p>Can only be called by the device owner, otherwise a {@link SecurityException} will be
+ * thrown.
+ *
* @param admin Which device owner this request is associated with.
* @return {@code true} if device logging is enabled by device owner, {@code false} otherwise.
*/
@@ -5720,6 +5726,9 @@ public class DevicePolicyManager {
* <p> Access to the logs is rate limited and it will only return new logs after the device
* owner has been notified via {@link DeviceAdminReceiver#onSecurityLogsAvailable}.
*
+ * <p>There must be only one user on the device, managed by the device owner.
+ * Otherwise a {@link SecurityException} will be thrown.
+ *
* @param admin Which device owner this request is associated with.
* @return the new batch of device logs which is a list of {@link SecurityEvent},
* or {@code null} if rate limitation is exceeded or if logging is currently disabled.
@@ -5764,6 +5773,9 @@ public class DevicePolicyManager {
* result, this API is provided as best-effort and the returned logs may contain corrupted data.
* </strong>
*
+ * <p>There must be only one user on the device, managed by the device owner.
+ * Otherwise a {@link SecurityException} will be thrown.
+ *
* @param admin Which device owner this request is associated with.
* @return Device logs from before the latest reboot of the system.
*/