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

Commit 771cbcab authored by Rhed Jao's avatar Rhed Jao
Browse files

Fix a NPE when am starts the instrumentation

Fix: 234465350
Test: atest CtsActivityManagerBackgroundActivityTestCases
Change-Id: I4ad1d09010130b3295660623a937deef1d01ffc0
parent 6d8dfd00
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -14538,19 +14538,19 @@ public class ActivityManagerService extends IActivityManager.Stub
            try {
                ii = pm.getInstrumentationInfoAsUser(className, STOCK_PM_FLAGS, userId);
                ai = pm.getApplicationInfo(ii.targetPackage, STOCK_PM_FLAGS, userId);
            } catch (RemoteException e) {
            }
                if (ii == null) {
                    reportStartInstrumentationFailureLocked(watcher, className,
                            "Unable to find instrumentation info for: " + className);
                    return false;
                }
                ai = pm.getApplicationInfo(ii.targetPackage, STOCK_PM_FLAGS, userId);
                if (ai == null) {
                    reportStartInstrumentationFailureLocked(watcher, className,
                            "Unable to find instrumentation target package: " + ii.targetPackage);
                    return false;
                }
            } catch (RemoteException e) {
            }
            if (ii.targetPackage.equals("android")) {
                if (!noRestart) {