Refactor runtime hidden API flag from negative to positive
There are only two situations in which we want to enable hidden API
access flag checks. Turning the flag from DISABLE_ to ENABLE_
simplifies logic in ART and reduces the number places where the flag
had to be passed down to ART.
Bug: 64382372
Test: boot device, install and run apps, check log messages
(cherry picked from commit 22cce5a179a1dd47cf402fbff9170df2e4703264)
Change-Id: I468df458e9dd9e6a9b5ec56c03d1ba56c850c4dc
diff --git a/cmds/installd/installd_constants.h b/cmds/installd/installd_constants.h
index 9b6714d..06c83e4 100644
--- a/cmds/installd/installd_constants.h
+++ b/cmds/installd/installd_constants.h
@@ -52,7 +52,7 @@
// Tells the compiler that it is invoked from the background service. This
// controls whether extra debugging flags can be used (taking more compile time.)
constexpr int DEXOPT_IDLE_BACKGROUND_JOB = 1 << 9;
-constexpr int DEXOPT_DISABLE_HIDDEN_API_CHECKS = 1 << 10;
+constexpr int DEXOPT_ENABLE_HIDDEN_API_CHECKS = 1 << 10;
/* all known values for dexopt flags */
constexpr int DEXOPT_MASK =
@@ -64,7 +64,7 @@
| DEXOPT_FORCE
| DEXOPT_STORAGE_CE
| DEXOPT_STORAGE_DE
- | DEXOPT_DISABLE_HIDDEN_API_CHECKS;
+ | DEXOPT_ENABLE_HIDDEN_API_CHECKS;
// NOTE: keep in sync with StorageManager
constexpr int FLAG_STORAGE_DE = 1 << 0;