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

Commit 0c0fb22e authored by wilsonshih's avatar wilsonshih
Browse files

Prevent system server crash while start activity failed.

NPE at PendingActivityLaunch#sendErrorResult, callerApp can be null.

Bug: 135648362
Test: atest ActivityStarterTests
Change-Id: I7949dc1effcc171834f6bc3ff0333f9090b58480
parent a023ed5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -415,7 +415,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {


        void sendErrorResult(String message) {
        void sendErrorResult(String message) {
            try {
            try {
                if (callerApp.hasThread()) {
                if (callerApp != null && callerApp.hasThread()) {
                    callerApp.getThread().scheduleCrash(message);
                    callerApp.getThread().scheduleCrash(message);
                }
                }
            } catch (RemoteException e) {
            } catch (RemoteException e) {