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

Commit a8231e1c authored by Wenyi Wang's avatar Wenyi Wang Committed by android-build-merger
Browse files

Use targetSdkVersion 24 and remove startsWith("N")

am: f9adef9d8c

* commit 'f9adef9d8c5d38501e4006917712c1338f26f220':
  Use targetSdkVersion 24 and remove startsWith("N")

Change-Id: Ia04387083b23025906c425ee70a61cacb63cd579
parents 866fc753 cd923992
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -33,7 +33,6 @@ import com.android.contacts.common.model.dataitem.ImDataItem;
import com.android.contacts.common.testing.NeededForTesting;
import com.android.contacts.common.compat.ContactsCompat;
import com.android.contacts.common.compat.DirectoryCompat;
import com.android.contacts.common.compat.SdkSelectionUtils;
import com.android.contacts.common.model.AccountTypeManager;

import java.lang.annotation.Retention;
@@ -52,9 +51,7 @@ public class ContactsUtils {

    private static int sThumbnailSize = -1;

    public static final boolean FLAG_N_FEATURE = SdkSelectionUtils.TARGET_N_SDK // build-time flag
            && (Build.VERSION.SDK_INT > Build.VERSION_CODES.M // runtime flag
                    || Build.VERSION.CODENAME.startsWith("N")); // TODO: remove startsWith("N")
    public static final boolean FLAG_N_FEATURE = Build.VERSION.SDK_INT > Build.VERSION_CODES.M;

    // TODO find a proper place for the canonical version of these
    public interface ProviderNames {
+1 −3
Original line number Diff line number Diff line
@@ -176,9 +176,7 @@ public final class CompatUtils {
        // SdkVersionOverride doesn't work here because VERSION.SDK_INT remains 23 (same as M)
        // before N is release

        // TODO: remove build time check and use proper runtime check once N is released.
        return SdkSelectionUtils.TARGET_N_SDK // Build time flag
                && CODENAME_STARTS_WITH_N;  // Run time flag
        return Build.VERSION.SDK_INT > Build.VERSION_CODES.M;  // Run time flag
    }

    /**