summaryrefslogtreecommitdiff
path: root/telephony/common
diff options
context:
space:
mode:
authorAmit Mahajan <amitmahajan@google.com>2021-04-15 16:47:10 -0700
committerAmit Mahajan <amitmahajan@google.com>2021-04-15 23:54:21 +0000
commitfc8f4300920bbc78f616f3108893104bf9b9d099 (patch)
tree7d7119a67b7390a04ebd9acc5755b7fe8c279c0b /telephony/common
parentac6f5ee9271cb65f01c52ee32b20625294e8d350 (diff)
Add null check before trying to give appOps to package.
Test: none Bug: 164209140 Change-Id: I64184e9d035be538684c42c85c869f09b048069f
Diffstat (limited to 'telephony/common')
-rw-r--r--telephony/common/com/android/internal/telephony/SmsApplication.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/telephony/common/com/android/internal/telephony/SmsApplication.java b/telephony/common/com/android/internal/telephony/SmsApplication.java
index 32533cbf97fb..0d6cd5a30e8c 100644
--- a/telephony/common/com/android/internal/telephony/SmsApplication.java
+++ b/telephony/common/com/android/internal/telephony/SmsApplication.java
@@ -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.