Drop support for Android 2.1 and 2.2

pull/384/head
Alex Baker 9 years ago
parent 8cc0f77527
commit 2181132b7a

@ -30,7 +30,7 @@ android {
defaultConfig {
versionCode 379
versionName "4.7.22"
minSdkVersion 7
minSdkVersion 9
targetSdkVersion 22
}
@ -73,9 +73,7 @@ android {
productFlavors {
generic
googleplay {
minSdkVersion 9
}
googleplay
}
}

@ -334,10 +334,6 @@ public class AndroidUtilities {
}
}
public static boolean preFroyo() {
return !atLeastFroyo();
}
public static boolean preGingerbreadMR1() {
return !atLeastGingerbreadMR1();
}
@ -358,14 +354,6 @@ public class AndroidUtilities {
return !atLeastLollipop();
}
public static boolean atLeastFroyo() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO;
}
public static boolean atLeastGingerbread() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD;
}
public static boolean atLeastGingerbreadMR1() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1;
}

@ -24,8 +24,6 @@ import java.util.Set;
import javax.inject.Inject;
import static com.todoroo.andlib.utility.AndroidUtilities.preFroyo;
public class CalendarAlarmReceiver extends InjectingBroadcastReceiver {
private static final Logger log = LoggerFactory.getLogger(CalendarAlarmReceiver.class);
@ -81,10 +79,6 @@ public class CalendarAlarmReceiver extends InjectingBroadcastReceiver {
ContentResolver cr = context.getContentResolver();
Uri eventUri = Calendars.getCalendarContentUri(Calendars.CALENDAR_CONTENT_EVENTS);
if (preFroyo()) {
return;
}
String[] eventArg = new String[] { Long.toString(eventId) };
Cursor event = cr.query(eventUri,
EVENTS_PROJECTION,

@ -12,7 +12,6 @@ import com.todoroo.andlib.utility.AndroidUtilities;
import javax.inject.Singleton;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastFroyo;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastIceCreamSandwich;
@Singleton
@ -55,11 +54,7 @@ public class Calendars {
return getIcsUri(table);
}
if(atLeastFroyo()) {
return Uri.parse("content://com.android.calendar/" + table);
} else {
return Uri.parse("content://calendar/" + table);
}
return Uri.parse("content://com.android.calendar/" + table);
}
private static Uri getIcsUri(String table) {

@ -18,8 +18,6 @@ import java.io.File;
import javax.inject.Inject;
import static com.todoroo.andlib.utility.AndroidUtilities.preFroyo;
public class MiscellaneousPreferences extends InjectingPreferenceActivity {
private static final Logger log = LoggerFactory.getLogger(MiscellaneousPreferences.class);
@ -106,19 +104,15 @@ public class MiscellaneousPreferences extends InjectingPreferenceActivity {
private void initializeCalendarReminderPreference() {
Preference calendarReminderPreference = findPreference(getString(R.string.p_calendar_reminders));
if (preFroyo()) {
getPreferenceScreen().removePreference(calendarReminderPreference);
} else {
calendarReminderPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (newValue != null && ((Boolean) newValue)) {
calendarAlarmScheduler.scheduleCalendarAlarms(MiscellaneousPreferences.this, true);
}
return true;
calendarReminderPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
if (newValue != null && ((Boolean) newValue)) {
calendarAlarmScheduler.scheduleCalendarAlarms(MiscellaneousPreferences.this, true);
}
});
}
return true;
}
});
}
private void initializeVoiceReminderPreference() {

Loading…
Cancel
Save