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

Commit 18f33039 authored by Rhed Jao's avatar Rhed Jao Committed by Android (Google) Code Review
Browse files

Merge "Fix a NPE when am starts the instrumentation"

parents 62e9a197 771cbcab
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -14583,19 +14583,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) {