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
This commit is contained in:
Victor Hsieh
2018-03-27 07:22:32 -07:00
parent b429012907
commit b5a564a056
2 changed files with 5 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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());
}
}