summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2021-03-01 16:46:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-03-01 16:46:04 +0000
commitf2a757669602feb03782791c3708730b6643a1fb (patch)
tree744bd8a1a164e957951089f9dd435e1bc54f3140 /core/java
parentf288c41d5249e669ab0bb8fae68d0e8076836d15 (diff)
parent161704e504c9e232bec5828f1e8c11f5a461b300 (diff)
Merge "Fixed createAndManageUser() for headless system user mode." into sc-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/admin/DeviceAdminReceiver.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DeviceAdminReceiver.java b/core/java/android/app/admin/DeviceAdminReceiver.java
index 721a444f0f15..cccc9294c2d5 100644
--- a/core/java/android/app/admin/DeviceAdminReceiver.java
+++ b/core/java/android/app/admin/DeviceAdminReceiver.java
@@ -585,6 +585,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
* @param intent The received intent as per {@link #onReceive}.
*/
public void onEnabled(@NonNull Context context, @NonNull Intent intent) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onEnabled() on user " + context.getUserId());
+ }
}
/**
@@ -600,6 +603,10 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public @Nullable CharSequence onDisableRequested(@NonNull Context context,
@NonNull Intent intent) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onDisableRequested() on user "
+ + context.getUserId());
+ }
return null;
}
@@ -612,6 +619,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
* @param intent The received intent as per {@link #onReceive}.
*/
public void onDisabled(@NonNull Context context, @NonNull Intent intent) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onDisabled() on user " + context.getUserId());
+ }
}
/**
@@ -786,6 +796,10 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
* @param intent The received intent as per {@link #onReceive}.
*/
public void onProfileProvisioningComplete(@NonNull Context context, @NonNull Intent intent) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onProfileProvisioningComplete() on user "
+ + context.getUserId());
+ }
}
/**
@@ -961,6 +975,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public void onUserAdded(@NonNull Context context, @NonNull Intent intent,
@NonNull UserHandle addedUser) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onUserAdded() on user " + context.getUserId());
+ }
}
/**
@@ -974,6 +991,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public void onUserRemoved(@NonNull Context context, @NonNull Intent intent,
@NonNull UserHandle removedUser) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onUserRemoved() on user " + context.getUserId());
+ }
}
/**
@@ -987,6 +1007,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public void onUserStarted(@NonNull Context context, @NonNull Intent intent,
@NonNull UserHandle startedUser) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onUserStarted() on user " + context.getUserId());
+ }
}
/**
@@ -1000,6 +1023,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public void onUserStopped(@NonNull Context context, @NonNull Intent intent,
@NonNull UserHandle stoppedUser) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onUserStopped() on user " + context.getUserId());
+ }
}
/**
@@ -1013,6 +1039,9 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
*/
public void onUserSwitched(@NonNull Context context, @NonNull Intent intent,
@NonNull UserHandle switchedUser) {
+ if (LOCAL_LOGV) {
+ Log.v(TAG, getClass().getName() + ".onUserSwitched() on user " + context.getUserId());
+ }
}
/**
@@ -1104,7 +1133,8 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
public void onReceive(@NonNull Context context, @NonNull Intent intent) {
String action = intent.getAction();
if (LOCAL_LOGV) {
- Log.v(TAG, "onReceive(): received " + action + " on user " + context.getUserId());
+ Log.v(TAG, getClass().getName() + ".onReceive(): received " + action + " on user "
+ + context.getUserId());
}
if (ACTION_PASSWORD_CHANGED.equals(action)) {