Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4688f07 authored by Brandon Maxwell's avatar Brandon Maxwell
Browse files

Adding method to check if the version is L Mr1

Change-Id: I2d8d3de445b6782350714721a94cf5e5e9a7b895
parent 49344cd7
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ import android.os.Build;
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 {
@@ -89,6 +88,17 @@ public final class CompatUtils {
                >= Build.VERSION_CODES.M;
    }

    /**
     * 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.