diff options
| author | 2025-02-26 08:48:33 -0800 | |
|---|---|---|
| committer | 2025-02-26 08:48:33 -0800 | |
| commit | 871066489a0901c7f10463de9cb2f8d323f13cec (patch) | |
| tree | d6390dc0394fd9d733d360562598fd0064bf90b4 | |
| parent | 2b5170fbd2438eda52650f1dca284690822caab8 (diff) | |
Ensure the process record exists to avoid a NPE.
Bug: 397823061
Change-Id: I0496137db087f5c48e3c7739ee58f74c916db4d3
Test: atest ActivityManagerServiceTest
Test: atest VoipCallMonitorTest
Test: atest CallStyleNotificationsTest
Flag: EXEMPT bugfix
| -rw-r--r-- | services/core/java/com/android/server/am/ActiveServices.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index fdadaaf9654e..21440b466d8d 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -9191,7 +9191,9 @@ public final class ActiveServices { } else { synchronized (mAm.mPidsSelfLocked) { callerApp = mAm.mPidsSelfLocked.get(callingPid); - caller = callerApp.getThread(); + if (callerApp != null) { + caller = callerApp.getThread(); + } } } if (callerApp == null) { |