summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ivan Chiang <chiangi@google.com> 2024-01-15 07:39:50 +0000
committer Ivan Chiang <chiangi@google.com> 2024-01-15 07:39:50 +0000
commitb4a2361623b37870f71060a20f30f83e05a856ad (patch)
tree9620a3032f71620e77f4c7a54262bb97f5afef15
parent647dbb6239eab28b5054167e0e2b06347568dbe2 (diff)
[PM] Make ApexManager#getApksInApex public for testing
Test: atest ModuleInfoProviderTest Fix: 319839178 Change-Id: Idc957026dcf0c4b537cf901986492d63c197979b
-rw-r--r--services/core/java/com/android/server/pm/ApexManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index 659c36c56047..5d71439e8f46 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -276,7 +276,8 @@ public abstract class ApexManager {
* Returns list of {@code packageName} of apks inside the given apex.
* @param apexPackageName Package name of the apk container of apex
*/
- abstract List<String> getApksInApex(String apexPackageName);
+ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
+ public abstract List<String> getApksInApex(String apexPackageName);
/**
* Returns the apex module name for the given package name, if the package is an APEX. Otherwise
@@ -751,8 +752,9 @@ public abstract class ApexManager {
}
}
+ @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE)
@Override
- List<String> getApksInApex(String apexPackageName) {
+ public List<String> getApksInApex(String apexPackageName) {
synchronized (mLock) {
Preconditions.checkState(mPackageNameToApexModuleName != null,
"APEX packages have not been scanned");