MCPcopy Create free account
hub / github.com/FazziCLAY/OpenToday / Build

Class Build

app/src/main/java/com/fazziclay/opentoday/Build.java:11–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10// I im happy!
11public class Build {
12 // Setting this :)
13 public static final BuildDebugStatus DEBUG_STATUS = BuildDebugStatus.AUTOMATIC;
14 public static final BuildLogsStatus LOGS_STATUS = BuildLogsStatus.OFF;
15 public static final boolean IS_SECRET_SETTINGS_AVAILABLE = true;
16 public static final boolean IS_SHADOW_CUSTOM_BUILD_CONFIG = false; // normally is FALSE
17 public static final FeatureFlag[] INITIAL_FEATURE_FLAGS = {
18 //FeatureFlag.TOOLBAR_DEBUG,
19 //FeatureFlag.ITEM_SLEEP_TIME,
20 //FeatureFlag.ITEM_DEBUG_TICK_COUNTER,
21 //FeatureFlag.DISABLE_DEBUG_MODE_NOTIFICATION,
22 };
23 public static final boolean PROFILERS = false; // normally is FALSE (long uses profilers causes crashes)
24
25
26 // work code
27 public static boolean isDebug() {
28 return switch (DEBUG_STATUS) {
29 case TRUE -> true;
30 case FALSE -> false;
31 case AUTOMATIC -> CustomBuildConfig.DEBUG;
32 };
33 }
34
35 public static boolean isLogs() {
36 return LOGS_STATUS != BuildLogsStatus.OFF;
37 }
38
39 public static boolean isLogsSave() {
40 return LOGS_STATUS == BuildLogsStatus.ON_WITH_FILE;
41 }
42
43 public static boolean isSecretSettingAvailable() {
44 return IS_SECRET_SETTINGS_AVAILABLE;
45 }
46
47 @NonNull
48 public static String getBuildDebugReport() {
49 return "DebugStatus=" + DEBUG_STATUS +
50 "; LogsStatus=" + LOGS_STATUS +
51 "; SecretSettings=" + IS_SECRET_SETTINGS_AVAILABLE +
52 "; ShadowCustomBuildConfig=" + IS_SHADOW_CUSTOM_BUILD_CONFIG +
53 "; InitialFeatureFlags=" + Arrays.toString(INITIAL_FEATURE_FLAGS) +
54 "; Profilers=" + PROFILERS;
55 }
56
57 public static boolean isProfilersEnabled() {
58 return PROFILERS;
59 }
60
61 public enum BuildDebugStatus {
62 TRUE,
63 FALSE,
64 AUTOMATIC
65 }
66
67 public enum BuildLogsStatus {
68 OFF,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected