Adding method to check if the version is L Mr1
Change-Id: I2d8d3de445b6782350714721a94cf5e5e9a7b895
diff --git a/src/com/android/contacts/common/compat/CompatUtils.java b/src/com/android/contacts/common/compat/CompatUtils.java
index 63d6f12..4a1edb3 100644
--- a/src/com/android/contacts/common/compat/CompatUtils.java
+++ b/src/com/android/contacts/common/compat/CompatUtils.java
@@ -19,7 +19,6 @@
import android.support.annotation.Nullable;
import android.util.Log;
-import com.android.contacts.common.compat.SdkVersionOverride;
import com.android.contacts.common.model.CPOWrapper;
public final class CompatUtils {
@@ -90,6 +89,17 @@
}
/**
+ * Determines if this version is compatible with Lollipop Mr1-specific APIs. Can also force the
+ * version to be lower through SdkVersionOverride.
+ *
+ * @return {@code true} if call subject is a feature on this device, {@code false} otherwise.
+ */
+ public static boolean isLollipopMr1Compatible() {
+ return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP_MR1)
+ >= Build.VERSION_CODES.LOLLIPOP_MR1;
+ }
+
+ /**
* Determines if this version is compatible with Marshmallow-specific APIs. Can also force the
* version to be lower through SdkVersionOverride.
*