Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1260bcd8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Swap for more framework APIs"

parents 63618542 aa407a9c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.systemui.statusbar.car;

import static android.content.DialogInterface.BUTTON_NEGATIVE;
import static android.content.DialogInterface.BUTTON_POSITIVE;
import static android.os.UserManager.DISALLOW_ADD_USER;

import android.app.ActivityManager;
import android.app.AlertDialog;
@@ -145,7 +146,8 @@ public class UserGridRecyclerView extends RecyclerView {
        userRecords.add(createStartGuestUserRecord());

        // Add add user record if the foreground user can add users
        if (mCarUserManagerHelper.canForegroundUserAddUsers()) {
        UserHandle fgUserHandle = UserHandle.of(ActivityManager.getCurrentUser());
        if (!mUserManager.hasUserRestriction(DISALLOW_ADD_USER, fgUserHandle)) {
            userRecords.add(createAddUserRecord());
        }

@@ -285,7 +287,7 @@ public class UserGridRecyclerView extends RecyclerView {
        }

        private void handleAddUserClicked() {
            if (mCarUserManagerHelper.isUserLimitReached()) {
            if (!mUserManager.canAddMoreUsers()) {
                mAddUserView.setEnabled(true);
                showMaxUserLimitReachedDialog();
            } else {