Merge "Remove obsolete DEXOPT_SAFEMODE."

am: 383b2af3ec

Change-Id: I97ccd9f087366d93495e3aeb8b26780039fd417b
This commit is contained in:
Nicolas Geoffray
2017-05-11 09:59:49 +00:00
committed by android-build-merger
2 changed files with 7 additions and 15 deletions

View File

@@ -42,22 +42,20 @@ public class Installer extends SystemService {
* **************************************************************************/ * **************************************************************************/
/** Application should be visible to everyone */ /** Application should be visible to everyone */
public static final int DEXOPT_PUBLIC = 1 << 1; public static final int DEXOPT_PUBLIC = 1 << 1;
/** Application wants to run in VM safe mode */
public static final int DEXOPT_SAFEMODE = 1 << 2;
/** Application wants to allow debugging of its code */ /** Application wants to allow debugging of its code */
public static final int DEXOPT_DEBUGGABLE = 1 << 3; public static final int DEXOPT_DEBUGGABLE = 1 << 2;
/** The system boot has finished */ /** The system boot has finished */
public static final int DEXOPT_BOOTCOMPLETE = 1 << 4; public static final int DEXOPT_BOOTCOMPLETE = 1 << 3;
/** Hint that the dexopt type is profile-guided. */ /** Hint that the dexopt type is profile-guided. */
public static final int DEXOPT_PROFILE_GUIDED = 1 << 5; public static final int DEXOPT_PROFILE_GUIDED = 1 << 4;
/** The compilation is for a secondary dex file. */ /** The compilation is for a secondary dex file. */
public static final int DEXOPT_SECONDARY_DEX = 1 << 6; public static final int DEXOPT_SECONDARY_DEX = 1 << 5;
/** Ignore the result of dexoptNeeded and force compilation. */ /** Ignore the result of dexoptNeeded and force compilation. */
public static final int DEXOPT_FORCE = 1 << 7; public static final int DEXOPT_FORCE = 1 << 6;
/** Indicates that the dex file passed to dexopt in on CE storage. */ /** Indicates that the dex file passed to dexopt in on CE storage. */
public static final int DEXOPT_STORAGE_CE = 1 << 8; public static final int DEXOPT_STORAGE_CE = 1 << 7;
/** Indicates that the dex file passed to dexopt in on DE storage. */ /** Indicates that the dex file passed to dexopt in on DE storage. */
public static final int DEXOPT_STORAGE_DE = 1 << 9; public static final int DEXOPT_STORAGE_DE = 1 << 8;
// NOTE: keep in sync with installd // NOTE: keep in sync with installd
public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 8; public static final int FLAG_CLEAR_CACHE_ONLY = 1 << 8;

View File

@@ -44,7 +44,6 @@ import static com.android.server.pm.Installer.DEXOPT_BOOTCOMPLETE;
import static com.android.server.pm.Installer.DEXOPT_DEBUGGABLE; import static com.android.server.pm.Installer.DEXOPT_DEBUGGABLE;
import static com.android.server.pm.Installer.DEXOPT_PROFILE_GUIDED; import static com.android.server.pm.Installer.DEXOPT_PROFILE_GUIDED;
import static com.android.server.pm.Installer.DEXOPT_PUBLIC; import static com.android.server.pm.Installer.DEXOPT_PUBLIC;
import static com.android.server.pm.Installer.DEXOPT_SAFEMODE;
import static com.android.server.pm.Installer.DEXOPT_SECONDARY_DEX; import static com.android.server.pm.Installer.DEXOPT_SECONDARY_DEX;
import static com.android.server.pm.Installer.DEXOPT_FORCE; import static com.android.server.pm.Installer.DEXOPT_FORCE;
import static com.android.server.pm.Installer.DEXOPT_STORAGE_CE; import static com.android.server.pm.Installer.DEXOPT_STORAGE_CE;
@@ -381,7 +380,6 @@ public class PackageDexOptimizer {
private int getDexFlags(ApplicationInfo info, String compilerFilter) { private int getDexFlags(ApplicationInfo info, String compilerFilter) {
int flags = info.flags; int flags = info.flags;
boolean vmSafeMode = (flags & ApplicationInfo.FLAG_VM_SAFE_MODE) != 0;
boolean debuggable = (flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; boolean debuggable = (flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
// Profile guide compiled oat files should not be public. // Profile guide compiled oat files should not be public.
boolean isProfileGuidedFilter = isProfileGuidedCompilerFilter(compilerFilter); boolean isProfileGuidedFilter = isProfileGuidedCompilerFilter(compilerFilter);
@@ -389,7 +387,6 @@ public class PackageDexOptimizer {
int profileFlag = isProfileGuidedFilter ? DEXOPT_PROFILE_GUIDED : 0; int profileFlag = isProfileGuidedFilter ? DEXOPT_PROFILE_GUIDED : 0;
int dexFlags = int dexFlags =
(isPublic ? DEXOPT_PUBLIC : 0) (isPublic ? DEXOPT_PUBLIC : 0)
| (vmSafeMode ? DEXOPT_SAFEMODE : 0)
| (debuggable ? DEXOPT_DEBUGGABLE : 0) | (debuggable ? DEXOPT_DEBUGGABLE : 0)
| profileFlag | profileFlag
| DEXOPT_BOOTCOMPLETE; | DEXOPT_BOOTCOMPLETE;
@@ -508,9 +505,6 @@ public class PackageDexOptimizer {
if ((flags & DEXOPT_PUBLIC) == DEXOPT_PUBLIC) { if ((flags & DEXOPT_PUBLIC) == DEXOPT_PUBLIC) {
flagsList.add("public"); flagsList.add("public");
} }
if ((flags & DEXOPT_SAFEMODE) == DEXOPT_SAFEMODE) {
flagsList.add("safemode");
}
if ((flags & DEXOPT_SECONDARY_DEX) == DEXOPT_SECONDARY_DEX) { if ((flags & DEXOPT_SECONDARY_DEX) == DEXOPT_SECONDARY_DEX) {
flagsList.add("secondary"); flagsList.add("secondary");
} }