summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kalauskas <peskal@google.com>2021-08-05 19:20:17 -0700
committerPeter Kalauskas <peskal@google.com>2021-08-06 14:16:36 -0700
commit89a3deb75e534a2ba632fc0dd71d0a26f45b7ddc (patch)
tree3bb71a90ed596af50b2e00a9d0b052af449ab456
parent5fac6c75bd65ee1b84c1023535d85c155de399a7 (diff)
Show indicator if guest creation is not allowed
When guest creation is not allowed by the admin, show a badge on the icon. The guest icon will still appear in the list, but if clicked the user will see a dialog that says: "Blocked by your IT admin", "If you have questions, contact your IT admin" Test: With config_guestUserAutoCreated=true, set the device owner during SUW, then disable user creation in the admin app, then open QS user switcher from the lock screen. Bug: 195699593 Change-Id: I2cb404e8c3262b48efafcc73f341b5c45728ab76
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 7548d1c435ed..251ecc626387 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -343,8 +343,7 @@ public class UserSwitcherController implements Dumpable {
true /* isGuest */, false /* isCurrent */,
false /* isAddUser */, false /* isRestricted */,
isSwitchToGuestEnabled);
- // Don't call checkIfAddUserDisallowedByAdminOnly if
- // config_guestUserAutoCreated=true.
+ checkIfAddUserDisallowedByAdminOnly(guestRecord);
records.add(guestRecord);
} else if (canCreateGuest) {
guestRecord = new UserRecord(null /* info */, null /* picture */,