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

Commit 32b5ac61 authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Add null check since LauncherUserInfo can be null.

Bug: 319142187
Test: Manual
Flag: N/A. Crash in tests.
Change-Id: Iaa9fc1b8e7c2c09621d984bfdeb9012bcc479ef8
parent eb1966c2
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()) {