From 9c0ad56d11b3b8bf3d8415aed0c17d8e78d8914c Mon Sep 17 00:00:00 2001 From: Tobias Dubois Date: Mon, 11 Jun 2018 16:17:17 +0200 Subject: [PATCH] Lint fix: IS_DEBUG_DEVICE: Implied default locale Use the ROOT locale to make sure toLowerCase has consistent behavior regardless of the currently set language. Test: Manual Change-Id: Ie43f76cbc15eee0d96314e92d2acd5abb22f7077 --- src/com/android/launcher3/Utilities.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 1c12464346..74fc8d1080 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -114,8 +114,9 @@ public final class Utilities { * 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. */ - public static final boolean IS_DEBUG_DEVICE = Build.TYPE.toLowerCase().contains("debug") - || Build.TYPE.toLowerCase().equals("eng"); + public static final boolean IS_DEBUG_DEVICE = + Build.TYPE.toLowerCase(Locale.ROOT).contains("debug") || + Build.TYPE.toLowerCase(Locale.ROOT).equals("eng"); // An intent extra to indicate the horizontal scroll of the wallpaper. public static final String EXTRA_WALLPAPER_OFFSET = "com.android.launcher3.WALLPAPER_OFFSET";