Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00001111 authored by Billy Lau's avatar Billy Lau
Browse files

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
parent 475712da
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -584,7 +584,7 @@ public class BinaryTransparencyService extends SystemService {
                            + packageInfo.applicationInfo.sourceDir);
                            + packageInfo.applicationInfo.sourceDir);
                    if (packageInfo.applicationInfo.sourceDir.startsWith("/data/apex/")) {
                    if (packageInfo.applicationInfo.sourceDir.startsWith("/data/apex/")) {
                        String origPackageFilepath = getOriginalApexPreinstalledLocation(
                        String origPackageFilepath = getOriginalApexPreinstalledLocation(
                                packageInfo.packageName, packageInfo.applicationInfo.sourceDir);
                                packageInfo.packageName);
                        pw.println("|--> Pre-installed package install location: "
                        pw.println("|--> Pre-installed package install location: "
                                + origPackageFilepath);
                                + origPackageFilepath);


@@ -1628,8 +1628,7 @@ public class BinaryTransparencyService extends SystemService {
    }
    }


    @NonNull
    @NonNull
    private String getOriginalApexPreinstalledLocation(String packageName,
    private String getOriginalApexPreinstalledLocation(String packageName) {
            String currentInstalledLocation) {
        try {
        try {
            final String moduleName = apexPackageNameToModuleName(packageName);
            final String moduleName = apexPackageNameToModuleName(packageName);
            IApexService apexService = IApexService.Stub.asInterface(
            IApexService apexService = IApexService.Stub.asInterface(