summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-03-01 03:45:40 +0000
committer android-build-merger <android-build-merger@google.com> 2018-03-01 03:45:40 +0000
commit1468e8cb33660914f915bd2b5a6401b85290aa87 (patch)
treea4b8a0dfc6a83f47619c6f28777f0e0021eda2b8
parent696bc6460e0be1e6a587dc8365fc91754dc3386a (diff)
parent30721b3a02279edcfaa6c1a3e410ed62a6dac7e6 (diff)
Merge "ART: Fix LOG_FATAL" am: 1330e553cc am: 4a4636369a
am: 30721b3a02 Change-Id: I094fa848eb623b60d3343415781636cd5bf31300
-rw-r--r--cmds/installd/dexopt.cpp5
-rw-r--r--cmds/installd/installd_constants.h1
-rw-r--r--cmds/installd/otapreopt.cpp3
3 files changed, 5 insertions, 4 deletions
diff --git a/cmds/installd/dexopt.cpp b/cmds/installd/dexopt.cpp
index 9f1cd451cc..02a60637de 100644
--- a/cmds/installd/dexopt.cpp
+++ b/cmds/installd/dexopt.cpp
@@ -1877,9 +1877,8 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins
const char* dex_metadata_path, const char* compilation_reason) {
CHECK(pkgname != nullptr);
CHECK(pkgname[0] != 0);
- if ((dexopt_flags & ~DEXOPT_MASK) != 0) {
- LOG_FATAL("dexopt flags contains unknown fields\n");
- }
+ CHECK_EQ(dexopt_flags & ~DEXOPT_MASK, 0)
+ << "dexopt flags contains unknown fields: " << dexopt_flags;
if (!validate_dex_path_size(dex_path)) {
return -1;
diff --git a/cmds/installd/installd_constants.h b/cmds/installd/installd_constants.h
index 06c83e4758..6282ba2512 100644
--- a/cmds/installd/installd_constants.h
+++ b/cmds/installd/installd_constants.h
@@ -64,6 +64,7 @@ constexpr int DEXOPT_MASK =
| DEXOPT_FORCE
| DEXOPT_STORAGE_CE
| DEXOPT_STORAGE_DE
+ | DEXOPT_IDLE_BACKGROUND_JOB
| DEXOPT_ENABLE_HIDDEN_API_CHECKS;
// NOTE: keep in sync with StorageManager
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp
index 899285a84e..76edb4cc74 100644
--- a/cmds/installd/otapreopt.cpp
+++ b/cmds/installd/otapreopt.cpp
@@ -82,7 +82,8 @@ static_assert(DEXOPT_STORAGE_DE == 1 << 8, "DEXOPT_STORAGE_DE unexpected.");
static_assert(DEXOPT_ENABLE_HIDDEN_API_CHECKS == 1 << 10,
"DEXOPT_ENABLE_HIDDEN_API_CHECKS unexpected");
-static_assert(DEXOPT_MASK == 0x5fe, "DEXOPT_MASK unexpected.");
+static_assert(DEXOPT_MASK == (0x5fe | DEXOPT_IDLE_BACKGROUND_JOB),
+ "DEXOPT_MASK unexpected.");