diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-11-02 10:31:24 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-11-02 10:31:41 -0700 |
commit | f5e3744637db1598c389e62450627b2548f8f517 (patch) | |
tree | 66078094384c6d2422c19253304f8e8de2e93477 /src/com/android/launcher3/Utilities.java | |
parent | cc42c5bd1073f4b4f45ea29a1b01563601729022 (diff) | |
download | android_packages_apps_Trebuchet-f5e3744637db1598c389e62450627b2548f8f517.tar.gz android_packages_apps_Trebuchet-f5e3744637db1598c389e62450627b2548f8f517.tar.bz2 android_packages_apps_Trebuchet-f5e3744637db1598c389e62450627b2548f8f517.zip |
Updating version check method names
Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 95e3d8269..13a69f21c 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -84,13 +84,11 @@ public final class Utilities { private static final int[] sLoc0 = new int[2]; private static final int[] sLoc1 = new int[2]; - public static boolean isNycMR1OrAbove() { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; - } + public static final boolean ATLEAST_NOUGAT_MR1 = + Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1; - public static boolean isNycOrAbove() { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; - } + public static final boolean ATLEAST_NOUGAT = + Build.VERSION.SDK_INT >= Build.VERSION_CODES.N; public static final boolean ATLEAST_MARSHMALLOW = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M; @@ -137,7 +135,7 @@ public final class Utilities { } public static boolean getAllowRotationDefaultValue(Context context) { - if (isNycOrAbove()) { + if (ATLEAST_NOUGAT) { // If the device was scaled, used the original dimensions to determine if rotation // is allowed of not. Resources res = context.getResources(); @@ -619,7 +617,7 @@ public final class Utilities { } public static boolean isWallpaperAllowed(Context context) { - if (isNycOrAbove()) { + if (ATLEAST_NOUGAT) { try { WallpaperManager wm = context.getSystemService(WallpaperManager.class); return (Boolean) wm.getClass().getDeclaredMethod("isSetWallpaperAllowed") |