Merge "Add null check before trying to give appOps to package." into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-16 03:19:10 +00:00
committed by Android (Google) Code Review

View File

@@ -760,6 +760,7 @@ public final class SmsApplication {
private static void assignExclusiveSmsPermissionsToSystemApp(Context context,
PackageManager packageManager, AppOpsManager appOps, String packageName,
boolean sigatureMatch) {
if (packageName == null) return;
// First check package signature matches the caller's package signature.
// Since this class is only used internally by the system, this check makes sure
// the package signature matches system signature.