summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author lpeter <lpeter@google.com> 2024-05-10 13:04:50 +0000
committer lpeter <lpeter@google.com> 2024-05-10 13:04:50 +0000
commitbe6807e812c854c4dc5cf2ec9eadbddf9acf811c (patch)
tree276fa90fa4ca49c8b78439c5ce8c7b488c9cce48
parent4ff9eb1e11693d6c1092ad718a2fa524d33b2bbc (diff)
Add null pointer check for component name
Bug: 339651741 Test: presubmit Change-Id: I70fb8c3521cc21ab0f061aec90e0bf11dcf36550
-rw-r--r--services/core/java/com/android/server/pm/Settings.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 1309e44af6d3..41d6288d4411 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -2139,10 +2139,17 @@ public final class Settings implements Watchable, Snappable, ResilientAtomicFile
continue;
}
+ ComponentName unflattenOriginalComponentName = ComponentName.unflattenFromString(
+ originalComponentName);
+ if (unflattenOriginalComponentName == null) {
+ Slog.d(TAG, "Incorrect component name from the attributes");
+ continue;
+ }
+
activityInfos.add(
new ArchiveState.ArchiveActivityInfo(
title,
- ComponentName.unflattenFromString(originalComponentName),
+ unflattenOriginalComponentName,
iconPath,
monochromeIconPath));
}