From 2520d44e664049f67f56795bedf5cc1d0494cc44 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 5 May 2017 14:32:51 +0100 Subject: [PATCH] Remove obsolete DEXOPT_SAFEMODE. installd side of the change. bug:37929796 Test: build Change-Id: I358c0784a7b563cbd6ceaecdb80710971f483d02 (cherry picked from commit bad623a225d0b3d94f30f8654bd4684969e90d4c) --- cmds/installd/installd_constants.h | 16 +++++++--------- cmds/installd/otapreopt.cpp | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/cmds/installd/installd_constants.h b/cmds/installd/installd_constants.h index d8a754cc9b..6a81cfc34a 100644 --- a/cmds/installd/installd_constants.h +++ b/cmds/installd/installd_constants.h @@ -38,23 +38,21 @@ constexpr size_t PKG_PATH_MAX = 256u; /* max size of any path we use */ * frameworks/base/services/core/java/com/android/server/pm/Installer.java ***************************************************************************/ constexpr int DEXOPT_PUBLIC = 1 << 1; -constexpr int DEXOPT_SAFEMODE = 1 << 2; -constexpr int DEXOPT_DEBUGGABLE = 1 << 3; -constexpr int DEXOPT_BOOTCOMPLETE = 1 << 4; -constexpr int DEXOPT_PROFILE_GUIDED = 1 << 5; -constexpr int DEXOPT_SECONDARY_DEX = 1 << 6; +constexpr int DEXOPT_DEBUGGABLE = 1 << 2; +constexpr int DEXOPT_BOOTCOMPLETE = 1 << 3; +constexpr int DEXOPT_PROFILE_GUIDED = 1 << 4; +constexpr int DEXOPT_SECONDARY_DEX = 1 << 5; // DEXOPT_FORCE, DEXOPT_STORAGE_CE, DEXOPT_STORAGE_DE are exposed for secondary // dex files only. Primary apks are analyzed in PackageManager and installd // does not need to know if the compilation is forced or on what kind of storage // the dex files are. -constexpr int DEXOPT_FORCE = 1 << 7; -constexpr int DEXOPT_STORAGE_CE = 1 << 8; -constexpr int DEXOPT_STORAGE_DE = 1 << 9; +constexpr int DEXOPT_FORCE = 1 << 6; +constexpr int DEXOPT_STORAGE_CE = 1 << 7; +constexpr int DEXOPT_STORAGE_DE = 1 << 8; /* all known values for dexopt flags */ constexpr int DEXOPT_MASK = DEXOPT_PUBLIC - | DEXOPT_SAFEMODE | DEXOPT_DEBUGGABLE | DEXOPT_BOOTCOMPLETE | DEXOPT_PROFILE_GUIDED diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp index 9a3fb70a8a..43d0780b44 100644 --- a/cmds/installd/otapreopt.cpp +++ b/cmds/installd/otapreopt.cpp @@ -472,7 +472,8 @@ private: case 6: { // Version 1 had: constexpr int OLD_DEXOPT_PUBLIC = 1 << 1; - constexpr int OLD_DEXOPT_SAFEMODE = 1 << 2; + // Note: DEXOPT_SAFEMODE has been removed. + // constexpr int OLD_DEXOPT_SAFEMODE = 1 << 2; constexpr int OLD_DEXOPT_DEBUGGABLE = 1 << 3; constexpr int OLD_DEXOPT_BOOTCOMPLETE = 1 << 4; constexpr int OLD_DEXOPT_PROFILE_GUIDED = 1 << 5; @@ -480,7 +481,6 @@ private: int input = atoi(param); package_parameters_.dexopt_flags = ReplaceMask(input, OLD_DEXOPT_PUBLIC, DEXOPT_PUBLIC) | - ReplaceMask(input, OLD_DEXOPT_SAFEMODE, DEXOPT_SAFEMODE) | ReplaceMask(input, OLD_DEXOPT_DEBUGGABLE, DEXOPT_DEBUGGABLE) | ReplaceMask(input, OLD_DEXOPT_BOOTCOMPLETE, DEXOPT_BOOTCOMPLETE) | ReplaceMask(input, OLD_DEXOPT_PROFILE_GUIDED, DEXOPT_PROFILE_GUIDED) | -- 2.11.0