summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-06-18 06:42:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-06-18 06:42:27 +0000
commit381927b876e8c03d0e6695f99e9b1e4a4e352dc1 (patch)
treec722529a89ba1b945345311457b86eab3fc46719
parent59ce07a60730b15d20480289f5ce8d930385b135 (diff)
parenteda4cb6bca4d5364ede9d52184a27b87b005928d (diff)
downloadcts-381927b876e8c03d0e6695f99e9b1e4a4e352dc1.tar.gz
Merge "[cts] fix NPE in InstallSessionCleanupTest" into tm-dev
-rw-r--r--tests/tests/content/src/android/content/pm/cts/InstallSessionCleanupTest.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/tests/content/src/android/content/pm/cts/InstallSessionCleanupTest.java b/tests/tests/content/src/android/content/pm/cts/InstallSessionCleanupTest.java
index dd9d10f85c1..599be5ca9fd 100644
--- a/tests/tests/content/src/android/content/pm/cts/InstallSessionCleanupTest.java
+++ b/tests/tests/content/src/android/content/pm/cts/InstallSessionCleanupTest.java
@@ -103,7 +103,8 @@ public class InstallSessionCleanupTest {
final List<PackageInstaller.SessionInfo> allSessions = mPackageInstaller.getAllSessions();
List<Integer> result = new ArrayList<>();
for (PackageInstaller.SessionInfo sessionInfo : allSessions) {
- if (sessionInfo.installerPackageName.equals(installerPackageName)) {
+ if (sessionInfo.installerPackageName != null
+ && sessionInfo.installerPackageName.equals(installerPackageName)) {
result.add(sessionInfo.sessionId);
}
}