Loading packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java +5 −5 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.car.user.CarUserManager; import android.car.user.UserCreationResult; import android.car.user.UserSwitchResult; import android.car.userlib.UserHelper; import android.car.util.concurrent.AsyncFuture; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; Loading Loading @@ -60,7 +61,6 @@ import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.android.internal.infra.AndroidFuture; import com.android.internal.util.UserIcons; import com.android.systemui.R; Loading Loading @@ -449,7 +449,7 @@ public class UserGridRecyclerView extends RecyclerView { */ @Nullable public UserInfo createNewOrFindExistingGuest(Context context) { AndroidFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); // CreateGuest will return null if a guest already exists. UserInfo newGuest = getUserInfo(future); if (newGuest != null) { Loading Loading @@ -482,7 +482,7 @@ public class UserGridRecyclerView extends RecyclerView { } @Nullable private UserInfo getUserInfo(AndroidFuture<UserCreationResult> future) { private UserInfo getUserInfo(AsyncFuture<UserCreationResult> future) { UserCreationResult userCreationResult; try { userCreationResult = future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS); Loading @@ -504,7 +504,7 @@ public class UserGridRecyclerView extends RecyclerView { } private boolean switchUser(@UserIdInt int userId) { AndroidFuture<UserSwitchResult> userSwitchResultFuture = AsyncFuture<UserSwitchResult> userSwitchResultFuture = mCarUserManager.switchUser(userId); UserSwitchResult userSwitchResult; try { Loading @@ -531,7 +531,7 @@ public class UserGridRecyclerView extends RecyclerView { @Override protected UserInfo doInBackground(String... userNames) { AndroidFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], /* flags= */ 0); try { UserInfo user = getUserInfo(future); Loading Loading
packages/CarSystemUI/src/com/android/systemui/car/userswitcher/UserGridRecyclerView.java +5 −5 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.car.user.CarUserManager; import android.car.user.UserCreationResult; import android.car.user.UserSwitchResult; import android.car.userlib.UserHelper; import android.car.util.concurrent.AsyncFuture; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; Loading Loading @@ -60,7 +61,6 @@ import androidx.core.graphics.drawable.RoundedBitmapDrawableFactory; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.android.internal.infra.AndroidFuture; import com.android.internal.util.UserIcons; import com.android.systemui.R; Loading Loading @@ -449,7 +449,7 @@ public class UserGridRecyclerView extends RecyclerView { */ @Nullable public UserInfo createNewOrFindExistingGuest(Context context) { AndroidFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); AsyncFuture<UserCreationResult> future = mCarUserManager.createGuest(mGuestName); // CreateGuest will return null if a guest already exists. UserInfo newGuest = getUserInfo(future); if (newGuest != null) { Loading Loading @@ -482,7 +482,7 @@ public class UserGridRecyclerView extends RecyclerView { } @Nullable private UserInfo getUserInfo(AndroidFuture<UserCreationResult> future) { private UserInfo getUserInfo(AsyncFuture<UserCreationResult> future) { UserCreationResult userCreationResult; try { userCreationResult = future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS); Loading @@ -504,7 +504,7 @@ public class UserGridRecyclerView extends RecyclerView { } private boolean switchUser(@UserIdInt int userId) { AndroidFuture<UserSwitchResult> userSwitchResultFuture = AsyncFuture<UserSwitchResult> userSwitchResultFuture = mCarUserManager.switchUser(userId); UserSwitchResult userSwitchResult; try { Loading @@ -531,7 +531,7 @@ public class UserGridRecyclerView extends RecyclerView { @Override protected UserInfo doInBackground(String... userNames) { AndroidFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], AsyncFuture<UserCreationResult> future = mCarUserManager.createUser(userNames[0], /* flags= */ 0); try { UserInfo user = getUserInfo(future); Loading