/** * PrioritizedMimeType is added in API level 23. */ public static boolean hasPrioritizedMimeType() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M; }
/** * Determines if this version is compatible with video calling. Can also force the version to be * lower through SdkVersionOverride. * * @return {@code true} if video calling is allowed, {@code false} otherwise. */ public static boolean isVideoCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP) >= Build.VERSION_CODES.M; }
/** * Determines if this version is compatible with multi-SIM and the phone account APIs. Can also * force the version to be lower through SdkVersionOverride. * * @return {@code true} if multi-SIM capability is available, {@code false} otherwise. */ public static boolean isMSIMCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP) >= 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. * * @return {@code true} if runtime sdk is compatible with Marshmallow, {@code false} otherwise. */ public static boolean isMarshmallowCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP) >= Build.VERSION_CODES.M; }
/** * Determines if this version is compatible with Lollipop-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 isLollipopCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP) >= Build.VERSION_CODES.LOLLIPOP; } }
/** * Determines if this version is capable of using presence checking for video calling. Support * for video call presence indication is added in SDK 24. * * @return {@code true} if video presence checking is allowed, {@code false} otherwise. */ public static boolean isVideoPresenceCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) > Build.VERSION_CODES.M; }
/** * Determines if this version is compatible with call subject. 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 isCallSubjectCompatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP) >= 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 runtime sdk is compatible with Lollipop MR1, {@code false} otherwise. */ public static boolean isLollipopMr1Compatible() { return SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.LOLLIPOP_MR1) >= Build.VERSION_CODES.LOLLIPOP_MR1; }
/** * Compatibility version of {@link android.provider.Settings.System#canWrite(Context)} * * Note: Since checking preferences at runtime started in M, this method always returns * {@code true} for SDK versions prior to 23. In those versions, the app wouldn't be * installed if it didn't have the proper permission */ public static boolean canWrite(Context context) { if (SdkVersionOverride.getSdkVersion(VERSION_CODES.LOLLIPOP) >= Build.VERSION_CODES.M) { return Settings.System.canWrite(context); } return true; } }
if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { where.append(" AND (").append(Voicemails.DELETED).append(" = 0)");
public static long getOrCreateThreadId(Context context, String recipient) { if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { return Telephony.Threads.getOrCreateThreadId(context, recipient); } else { return getOrCreateThreadIdInternal(context, recipient); } }
/** * Returns whether the operation in CPOWrapper is of TYPE_INSERT; */ public static boolean isInsertCompat(CPOWrapper cpoWrapper) { if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { return cpoWrapper.getOperation().isInsert(); } return (cpoWrapper.getType() == TYPE_INSERT); }
/** * Returns whether the operation in CPOWrapper is of TYPE_ASSERT; */ public static boolean isAssertQueryCompat(CPOWrapper cpoWrapper) { if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { return cpoWrapper.getOperation().isAssertQuery(); } return (cpoWrapper.getType() == TYPE_ASSERT); }
/** * Returns whether the operation in CPOWrapper is of TYPE_DELETE; */ public static boolean isDeleteCompat(CPOWrapper cpoWrapper) { if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { return cpoWrapper.getOperation().isDelete(); } return (cpoWrapper.getType() == TYPE_DELETE); } /**
/** * Returns whether the operation in CPOWrapper is of TYPE_UPDATE; */ public static boolean isUpdateCompat(CPOWrapper cpoWrapper) { if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M) { return cpoWrapper.getOperation().isUpdate(); } return (cpoWrapper.getType() == TYPE_UPDATE); }
if (SdkVersionOverride.getSdkVersion(Build.VERSION_CODES.M) >= Build.VERSION_CODES.M && telephonyManager.canChangeDtmfToneLength() && (telephonyManager.isWorldPhone() || !shouldHideCarrierSettings())) {