@Config(reportSdk = Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Test public void isCalendarAvailable_atLeastIcs_butCanNotAcceptIntent_shouldReturnFalse() throws Exception { context = createMockContextWithSpecificIntentData(null, null, "vnd.android.cursor.item/NOPE", "android.intent.action.INSERT"); assertThat(subject.isCalendarAvailable(context)).isFalse(); }
static boolean isCalendarAvailable(Context context) { Intent calendarIntent = new Intent(Intent.ACTION_INSERT).setType(ANDROID_CALENDAR_CONTENT_TYPE); return VersionCode.currentApiLevel().isAtLeast(VersionCode.ICE_CREAM_SANDWICH) && Intents.deviceCanHandleIntent(context, calendarIntent); }
MraidNativeCommandHandler { static boolean isCalendarAvailable(Context context) { Intent calendarIntent = new Intent(Intent.ACTION_INSERT).setType(ANDROID_CALENDAR_CONTENT_TYPE); return VersionCode.currentApiLevel().isAtLeast(VersionCode.ICE_CREAM_SANDWICH) && Intents.deviceCanHandleIntent(context, calendarIntent); } }
MraidNativeCommandHandler { static boolean isCalendarAvailable(Context context) { Intent calendarIntent = new Intent(Intent.ACTION_INSERT).setType(ANDROID_CALENDAR_CONTENT_TYPE); return VersionCode.currentApiLevel().isAtLeast(VersionCode.ICE_CREAM_SANDWICH) && Intents.deviceCanHandleIntent(context, calendarIntent); }  }
MraidNativeCommandHandler { static boolean isCalendarAvailable(Context context) { Intent calendarIntent = new Intent(Intent.ACTION_INSERT).setType(ANDROID_CALENDAR_CONTENT_TYPE); return VersionCode.currentApiLevel().isAtLeast(VersionCode.ICE_CREAM_SANDWICH) && Intents.deviceCanHandleIntent(context, calendarIntent); }  static boolean isStorePictureSupported(Context context); }
MraidNativeCommandHandler { static boolean isCalendarAvailable(Context context) { Intent calendarIntent = new Intent(Intent.ACTION_INSERT).setType(ANDROID_CALENDAR_CONTENT_TYPE); return VersionCode.currentApiLevel().isAtLeast(VersionCode.ICE_CREAM_SANDWICH) && Intents.deviceCanHandleIntent(context, calendarIntent); }  static boolean isStorePictureSupported(Context context); static final String ANDROID_CALENDAR_CONTENT_TYPE; }