mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Add null check since LauncherUserInfo can be null." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
64614a1ec6
@@ -80,6 +80,9 @@ public class ApiWrapper {
|
||||
if (android.os.Flags.allowPrivateProfile() && Flags.enablePrivateSpace()) {
|
||||
LauncherApps launcherApps = context.getSystemService(LauncherApps.class);
|
||||
LauncherUserInfo launcherUserInfo = launcherApps.getLauncherUserInfo(user);
|
||||
if (launcherUserInfo == null) {
|
||||
continue;
|
||||
}
|
||||
// UserTypes not supported in Launcher are deemed to be the current
|
||||
// Foreground User.
|
||||
int userType = switch (launcherUserInfo.getUserType()) {
|
||||
|
||||
Reference in New Issue
Block a user