summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-03-01 03:26:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-03-01 03:26:58 +0000
commit1330e553cc642df4a3c39f25137e1251657f0511 (patch)
treec373a36e845c5c9b9edfd7ea592420c03c899098
parented568f3fe29ac77bec7a20751761f5ed9f28d621 (diff)
parentd32eec2d9b37c57bc1b5491a63a04a356a7f8dd7 (diff)
Merge "ART: Fix LOG_FATAL"
-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 d8d579606e..20e7e49340 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.");