diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-06-23 21:56:25 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-06-23 21:56:25 +0000 |
commit | 0d21daace200502c45e0c976dd6a91eea03808e0 (patch) | |
tree | 5172cbd9b00481fbfeea343f5d97edad0e6dd35b /src/com/android/launcher3/Utilities.java | |
parent | 11cec0209c5f9f5b348e9a10b0c1a4f25609f073 (diff) | |
parent | 9994b2b171ab78d1d93e8a25086d6853f766e80f (diff) | |
download | android_packages_apps_Trebuchet-0d21daace200502c45e0c976dd6a91eea03808e0.tar.gz android_packages_apps_Trebuchet-0d21daace200502c45e0c976dd6a91eea03808e0.tar.bz2 android_packages_apps_Trebuchet-0d21daace200502c45e0c976dd6a91eea03808e0.zip |
Merge "Making some shortcut manager calls protected by MR1 version check" into ub-launcher3-calgary
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index 608a39c4b..8b42debcf 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -44,8 +44,10 @@ import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.PaintDrawable; import android.os.Build; +import android.os.Build.VERSION; import android.os.Bundle; import android.os.PowerManager; +import android.support.v4.os.BuildCompat; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; @@ -100,6 +102,12 @@ public final class Utilities { private static final int[] sLoc0 = new int[2]; private static final int[] sLoc1 = new int[2]; + public static boolean isNycMR1OrAbove() { + // TODO: Use the check from support lib + return !"REL".equals(VERSION.CODENAME) + && "NMR1".compareTo(VERSION.CODENAME) <= 0; + } + // TODO: use Build.VERSION_CODES when available public static final boolean ATLEAST_MARSHMALLOW = Build.VERSION.SDK_INT >= 23; |