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

Commit a084fb7b authored by joanne_chung's avatar joanne_chung
Browse files

[ActivityManager] Fix NullPointerException in startNextMatchingActivity.

Symptom:
NullPointerException crash while call startNextMatchingActivity.

Root Cause:
Activity starts with FLAG_DEBUG_LOG_RESOLUTION for debug dump.
If the current Activity is the last object of resolves list,
  we can not get the next Activity and aInfo is still null.

Solution:
Check null in debug log dump.

Change-Id: I4c5d14d9acd8d47768b36c95354763841579e050
parent a6151572
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4048,8 +4048,8 @@ public final class ActivityManagerService extends ActivityManagerNative
                        if (debug) {
                            Slog.v(TAG, "Next matching activity: found current " + r.packageName
                                    + "/" + r.info.name);
                            Slog.v(TAG, "Next matching activity: next is " + aInfo.packageName
                                    + "/" + aInfo.name);
                            Slog.v(TAG, "Next matching activity: next is " + ((aInfo == null)
                                    ? "null" : aInfo.packageName + "/" + aInfo.name));
                        }
                        break;
                    }