BinaryTransparencyService: fix getOriginalApexPreinstalledLocation

Currently, the `getOriginalApexPreinstalledLocation` method takes
two parameters but the second parameter is never used.

In this change, we remove the second (unused) parameter and fixed
the call site.

Bug: 266033262
Test: atest BinaryTransparencyServiceTest
Change-Id: If5df7ff1e8264cf90899cbd0034f58e4c2fd246c
This commit is contained in:
Billy Lau
2023-02-07 15:20:16 -06:00
parent 475712da99
commit 000011113f

View File

@@ -584,7 +584,7 @@ public class BinaryTransparencyService extends SystemService {
+ packageInfo.applicationInfo.sourceDir);
if (packageInfo.applicationInfo.sourceDir.startsWith("/data/apex/")) {
String origPackageFilepath = getOriginalApexPreinstalledLocation(
packageInfo.packageName, packageInfo.applicationInfo.sourceDir);
packageInfo.packageName);
pw.println("|--> Pre-installed package install location: "
+ origPackageFilepath);
@@ -1628,8 +1628,7 @@ public class BinaryTransparencyService extends SystemService {
}
@NonNull
private String getOriginalApexPreinstalledLocation(String packageName,
String currentInstalledLocation) {
private String getOriginalApexPreinstalledLocation(String packageName) {
try {
final String moduleName = apexPackageNameToModuleName(packageName);
IApexService apexService = IApexService.Stub.asInterface(