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

Commit 2b0b8983 authored by Songchun Fan's avatar Songchun Fan
Browse files

Fix extractNativeLib condition check

Should always extract native lib if it is not an incremental installation.

BUG: 146781591
Test: manual and check that *.so files are extracted.

$ adb install ~/Downloads/megacity.apk
$ adb shell
coral:/ # ls -R /data/app/com.unity.megacity-yNpLT0e2Zslj3bSo1EpYTg\=\=/lib/
/data/app/com.unity.megacity-yNpLT0e2Zslj3bSo1EpYTg==/lib/:
arm64

/data/app/com.unity.megacity-yNpLT0e2Zslj3bSo1EpYTg==/lib/arm64:
libil2cpp.so  libmain.so  libunity.so

Change-Id: I2b3bdf279e5d5f48304ffe10410469d41dc34625
parent b130bfbe
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -119,7 +119,6 @@ import com.android.internal.content.PackageHelper;
import com.android.internal.os.SomeArgs;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
import com.android.server.LocalServices;
import com.android.server.pm.Installer.InstallerException;
import com.android.server.pm.dex.DexManager;
@@ -1684,7 +1683,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
                computeProgressLocked(true);

                // Unpack native libraries for non-incremental installation
                if (isIncrementalInstallation()) {
                if (!isIncrementalInstallation()) {
                    extractNativeLibraries(stageDir, params.abiOverride, mayInheritNativeLibs());
                }
            }