summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorRubin Xu <rubinxu@google.com>2021-05-19 15:34:31 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-05-19 15:34:31 +0000
commit68aa35b03da8dd8dd1aeabb820d7d4eaae2e621a (patch)
tree6f7b771f27f31163bb5b80c09eb50f6fd685e0dd /core/java/android
parent393cd159ae9c1227abada1172b2778e4b0de8708 (diff)
parent372ab606e7585c2848ef2d4874877f1cde43afdb (diff)
Merge "Send network & security logging callbacks in foreground" into sc-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/admin/DelegatedAdminReceiver.java8
-rw-r--r--core/java/android/app/admin/DeviceAdminReceiver.java13
2 files changed, 19 insertions, 2 deletions
diff --git a/core/java/android/app/admin/DelegatedAdminReceiver.java b/core/java/android/app/admin/DelegatedAdminReceiver.java
index 36097c928bb0..c74ddb285644 100644
--- a/core/java/android/app/admin/DelegatedAdminReceiver.java
+++ b/core/java/android/app/admin/DelegatedAdminReceiver.java
@@ -104,6 +104,10 @@ public class DelegatedAdminReceiver extends BroadcastReceiver {
* receiver's manifest in order to receive this callback. The default implementation
* simply throws {@link UnsupportedOperationException}.
*
+ * <p>
+ * This callback is triggered by a foreground broadcast and the app should ensure that any
+ * long-running work is not executed synchronously inside the callback.
+ *
* @param context The running context as per {@link #onReceive}.
* @param intent The received intent as per {@link #onReceive}.
* @param batchToken The token representing the current batch of network logs.
@@ -130,6 +134,10 @@ public class DelegatedAdminReceiver extends BroadcastReceiver {
* the receiver's manifest in order to receive this callback. The default implementation
* simply throws {@link UnsupportedOperationException}.
*
+ * <p>
+ * This callback is triggered by a foreground broadcast and the app should ensure that any
+ * long-running work is not executed synchronously inside the callback.
+ *
* @param context The running context as per {@link #onReceive}.
* @param intent The received intent as per {@link #onReceive}.
* @see DevicePolicyManager#retrieveSecurityLogs
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index da64dcd5b5f5..27e8c46ca548 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -942,7 +942,12 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*
* <p>This callback will be re-triggered if the logs are not retrieved.
*
- * <p>This callback is only applicable to device owners.
+ * <p>This callback is only applicable to device owners and profile owners of
+ * organization-owned managed profiles.
+ *
+ * <p>
+ * This callback is triggered by a foreground broadcast and the app should ensure that any
+ * long-running work is not executed synchronously inside the callback.
*
* @param context The running context as per {@link #onReceive}.
* @param intent The received intent as per {@link #onReceive}.
@@ -961,7 +966,11 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
* possible to retrieve the network logs batch with the most recent {@code batchToken} provided
* by this callback. See {@link DevicePolicyManager#setAffiliationIds}.
*
- * <p>This callback is only applicable to device owners.
+ * <p>This callback is only applicable to device owners and profile owners.
+ *
+ * <p>
+ * This callback is triggered by a foreground broadcast and the app should ensure that any
+ * long-running work is not executed synchronously inside the callback.
*
* @param context The running context as per {@link #onReceive}.
* @param intent The received intent as per {@link #onReceive}.