From ec8328db8145a7f895fa5d8aceedd7135c28b749 Mon Sep 17 00:00:00 2001 From: Alex Buynytskyy Date: Wed, 18 Jan 2023 12:34:03 -0800 Subject: [PATCH] Null is a valid volume uuid. Bug: 265477208 Fixes: 265477208 Test: atest InstallSessionParamsUnitTest Change-Id: Ib2af1afc78b3d9c6d8eb534e5f536aae153eeeb0 --- .../java/com/android/internal/content/InstallLocationUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/com/android/internal/content/InstallLocationUtils.java b/core/java/com/android/internal/content/InstallLocationUtils.java index 4d9c09e92617b..a173ce16feea8 100644 --- a/core/java/com/android/internal/content/InstallLocationUtils.java +++ b/core/java/com/android/internal/content/InstallLocationUtils.java @@ -292,7 +292,7 @@ public class InstallLocationUtils { // For new installations of a predefined size, check property to let it through // regardless of the actual free space. - if (bestCandidate != null && Integer.MAX_VALUE == params.sizeBytes + if (!volumePaths.isEmpty() && Integer.MAX_VALUE == params.sizeBytes && SystemProperties.getBoolean("debug.pm.install_skip_size_check_for_maxint", false)) { return bestCandidate;