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

Commit 64614a1e authored by Anushree Ganjam's avatar Anushree Ganjam Committed by Android (Google) Code Review
Browse files

Merge "Add null check since LauncherUserInfo can be null." into main

parents dc566559 32b5ac61
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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()) {