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

Commit efa7268b authored by Brandon Maxwell's avatar Brandon Maxwell Committed by Android (Google) Code Review
Browse files

Merge "Adding method to check if the version is L Mr1" into ub-contactsdialer-b-dev

parents 54ea4b14 e4688f07
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.