Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Unified Diff: base/android/java/templates/BuildConfig.template

Issue 2499923003: Disable access to secondary dex files. (Closed)
Patch Set: Findbugs Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/android/java/templates/BuildConfig.template
diff --git a/base/android/java/templates/BuildConfig.template b/base/android/java/templates/BuildConfig.template
index 16f02f6a6cf7daf43ec8db98f43303a435d1f3bf..edfc8804eada4937495d46448404f7a1e8a37106 100644
--- a/base/android/java/templates/BuildConfig.template
+++ b/base/android/java/templates/BuildConfig.template
@@ -22,6 +22,19 @@ public class BuildConfig {
#endif
}
+ /** Whether this target was built for an official build or not.
+ *
+ * This has to be a function instead of a static final boolean s.t. the initial false value
+ * doesn't get optimized into {@link ChromeApplication} at base_java compile time.
+ */
+ public static boolean isOfficialBuild() {
+#if defined(IS_OFFICIAL_BUILD)
+ return true;
+#else
+ return false;
+#endif
+ }
+
// DCHECK_IS_ON does not change between targets, can be final and optimized out.
#if defined(_DCHECK_IS_ON)
public static final boolean DCHECK_IS_ON = true;

Powered by Google App Engine
This is Rietveld 408576698