summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-06-23 14:17:24 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-06-23 14:55:56 -0700
commit9994b2b171ab78d1d93e8a25086d6853f766e80f (patch)
tree52816518c6ec6adc6b2766f6a891c0b3223ad052 /src/com/android/launcher3/Utilities.java
parentaac20dba113d3c12a964357a56b0c2dfb9dcb0d7 (diff)
downloadandroid_packages_apps_Trebuchet-9994b2b171ab78d1d93e8a25086d6853f766e80f.tar.gz
android_packages_apps_Trebuchet-9994b2b171ab78d1d93e8a25086d6853f766e80f.tar.bz2
android_packages_apps_Trebuchet-9994b2b171ab78d1d93e8a25086d6853f766e80f.zip
Making some shortcut manager calls protected by MR1 version check
Change-Id: Ifdfa95a58aa18a825c1838c61055928dbe0ea3be
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 0306d573b..b24e1892c 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;