Fixes user switcher name and icon regressions.

In the full-screen user switcher:
- The guest action in the Add menu is now "Add Guest" instead of just
  "Guest"
- The add user icon is updated to what it's meant to be for large
  screens
- In guest mode, the guest user label is back to reading "exit guest"
  instead of just "guest"

Fix: 253623761
Test: manually verified on a large screen device that everything
mentioned above is correct.

Change-Id: I06cd4d21d3303765aa70b81bd714933f8da433f2
This commit is contained in:
Alejandro Nijamkin
2022-10-14 10:10:13 -07:00
parent f4ceebbadd
commit fd33d57fb4

View File

@@ -20,6 +20,7 @@ package com.android.systemui.user.ui.viewmodel
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.android.systemui.R
import com.android.systemui.common.shared.model.Text
import com.android.systemui.common.ui.drawable.CircularDrawable
import com.android.systemui.flags.FeatureFlags
import com.android.systemui.flags.Flags
@@ -152,7 +153,12 @@ private constructor(
): UserViewModel {
return UserViewModel(
viewKey = model.id,
name = model.name,
name =
if (model.isGuest) {
Text.Resource(com.android.settingslib.R.string.guest_exit_quick_settings_button)
} else {
model.name
},
image = CircularDrawable(model.image),
isSelectionMarkerVisible = model.isSelected,
alpha =
@@ -178,6 +184,7 @@ private constructor(
isAddSupervisedUser = model == UserActionModel.ADD_SUPERVISED_USER,
isAddUser = model == UserActionModel.ADD_USER,
isGuest = model == UserActionModel.ENTER_GUEST_MODE,
isTablet = true,
)
},
textResourceId =
@@ -190,6 +197,7 @@ private constructor(
isGuestUserResetting = guestUserInteractor.isGuestUserResetting,
isAddSupervisedUser = model == UserActionModel.ADD_SUPERVISED_USER,
isAddUser = model == UserActionModel.ADD_USER,
isTablet = true,
)
},
onClicked = {