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

Commit b5a564a0 authored by Victor Hsieh's avatar Victor Hsieh
Browse files

Downgrade OOB warning of priv app to warning

We can't enforce priv apps to uncompress .dex and .so just yet until all
priv apps from Play have done so.

Also fix the wrong default value.

Test: build
Bug: 76440172
Bug: 63920015
Change-Id: I98ab7272702c1693752f8e4ecb53e1b1eb5e1f35
parent b4290129
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10355,7 +10355,7 @@ public class PackageManagerService extends IPackageManager.Stub
        if (Build.IS_DEBUGGABLE &&
                pkg.isPrivileged() &&
                !SystemProperties.getBoolean(PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB, true)) {
                SystemProperties.getBoolean(PROPERTY_NAME_PM_DEXOPT_PRIV_APPS_OOB, false)) {
            PackageManagerServiceUtils.logPackageHasUncompressedCode(pkg);
        }
+4 −4
Original line number Diff line number Diff line
@@ -331,18 +331,18 @@ public class PackageManagerServiceUtils {
                ZipEntry entry = it.next();
                if (entry.getName().endsWith(".dex")) {
                    if (entry.getMethod() != ZipEntry.STORED) {
                        Slog.wtf(TAG, "APK " + fileName + " has compressed dex code " +
                        Slog.w(TAG, "APK " + fileName + " has compressed dex code " +
                                entry.getName());
                    } else if ((entry.getDataOffset() & 0x3) != 0) {
                        Slog.wtf(TAG, "APK " + fileName + " has unaligned dex code " +
                        Slog.w(TAG, "APK " + fileName + " has unaligned dex code " +
                                entry.getName());
                    }
                } else if (entry.getName().endsWith(".so")) {
                    if (entry.getMethod() != ZipEntry.STORED) {
                        Slog.wtf(TAG, "APK " + fileName + " has compressed native code " +
                        Slog.w(TAG, "APK " + fileName + " has compressed native code " +
                                entry.getName());
                    } else if ((entry.getDataOffset() & (0x1000 - 1)) != 0) {
                        Slog.wtf(TAG, "APK " + fileName + " has unaligned native code " +
                        Slog.w(TAG, "APK " + fileName + " has unaligned native code " +
                                entry.getName());
                    }
                }