Moving IS_DEBUG_DEVICE to a compile time flag for better proguard support
Bug: 270386012
Test: Presubmit
Change-Id: Ic4a81567f5b9752ab17c725566ce728c3d767bd6
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 67bc7fc..7d01f7b 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -131,10 +131,10 @@
/**
* Indicates if the device has a debug build. Should only be used to store additional info or
* add extra logging and not for changing the app behavior.
+ * @deprecated Use {@link BuildConfig#IS_DEBUG_DEVICE} directly
*/
- public static final boolean IS_DEBUG_DEVICE =
- Build.TYPE.toLowerCase(Locale.ROOT).contains("debug") ||
- Build.TYPE.toLowerCase(Locale.ROOT).equals("eng");
+ @Deprecated
+ public static final boolean IS_DEBUG_DEVICE = BuildConfig.IS_DEBUG_DEVICE;
/**
* Returns true if theme is dark.
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 0ec036c..84580fb 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -42,18 +42,22 @@
}
public static boolean showFlagTogglerUi(Context context) {
- return Utilities.IS_DEBUG_DEVICE && Utilities.isDevelopersOptionsEnabled(context);
+ return BuildConfig.IS_DEBUG_DEVICE && Utilities.isDevelopersOptionsEnabled(context);
}
/**
* True when the build has come from Android Studio and is being used for local debugging.
+ * @deprecated Use {@link BuildConfig#IS_STUDIO_BUILD} directly
*/
- public static final boolean IS_STUDIO_BUILD = BuildConfig.DEBUG;
+ @Deprecated
+ public static final boolean IS_STUDIO_BUILD = BuildConfig.IS_STUDIO_BUILD;
/**
* Enable moving the QSB on the 0th screen of the workspace. This is not a configuration feature
* and should be modified at a project level.
+ * @deprecated Use {@link BuildConfig#QSB_ON_FIRST_SCREEN} directly
*/
+ @Deprecated
public static final boolean QSB_ON_FIRST_SCREEN = BuildConfig.QSB_ON_FIRST_SCREEN;
/**