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

Commit 674702f0 authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Throw an error if no package name is provided by the app when needed

Avoid crashing system server if a calling app does not provide a package
name to broadcastIntent, instead throw an exception back.

Bug: 36452829
Test: Devices boots, apps work
Change-Id: Ie67ad4b631f399e674449e0787ed8fab47b89cb6
parent 6a10cba1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18266,6 +18266,10 @@ public class ActivityManagerService extends IActivityManager.Stub
            return record.info.isInstantApp();
        }
        // Otherwise check with PackageManager.
        if (callerPackage == null) {
            Slog.e(TAG, "isInstantApp with an application's uid, no record, and no package name");
            throw new IllegalArgumentException("Calling application did not provide package name");
        }
        mAppOpsService.checkPackage(uid, callerPackage);
        try {
            IPackageManager pm = AppGlobals.getPackageManager();