| 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;
|
|
|