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

Commit 5b8dc76c authored by Felipe Leme's avatar Felipe Leme
Browse files

Check for amInternal nullness on user.dump()

Bug: 133242016
Test: manual verification

Change-Id: I4f669c94b0be5f15465446cf768d16e483b440a4
parent 5284336d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -3897,9 +3897,14 @@ public class UserManagerService extends IUserManager.Stub {
        long now = System.currentTimeMillis();
        final long nowRealtime = SystemClock.elapsedRealtime();

        final int currentUser = LocalServices.getService(ActivityManagerInternal.class)
                .getCurrentUserId();
        pw.print("Current user: "); pw.println(currentUser);
        final ActivityManagerInternal amInternal = LocalServices
                .getService(ActivityManagerInternal.class);
        pw.print("Current user: ");
        if (amInternal != null) {
            pw.println(amInternal.getCurrentUserId());
        } else {
            pw.println("N/A");
        }

        StringBuilder sb = new StringBuilder();
        synchronized (mPackagesLock) {