Skip to content

Commit

Permalink
Bumped targetSdkVersion and compileSdkVersion (#3357)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 authored and lognaturel committed Oct 1, 2019
1 parent 4d3fd99 commit bcc613b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion collect_app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ android {
defaultConfig {
applicationId('org.odk.collect.android')
minSdkVersion(16)
targetSdkVersion(26)
targetSdkVersion(28)
versionCode LEGACY_BUILD_NUMBER_OFFSET + getMasterCommitCount()
versionName getVersionName()
testInstrumentationRunner('androidx.test.runner.AndroidJUnitRunner')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ public void setTitle(CharSequence title) {
*/
@SuppressWarnings("deprecation")
private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24HourView) {
// android:timePickerMode spinner and clock began in Lollipop
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.N) {
try {
// Get the theme's android:timePickerMode
final int MODE_SPINNER = 2;
Expand Down Expand Up @@ -251,13 +250,7 @@ private void fixSpinner(Context context, int hourOfDay, int minute, boolean is24
Object delegate = delegateField.get(timePicker);

Class<?> spinnerDelegateClass;
if (Build.VERSION.SDK_INT != Build.VERSION_CODES.LOLLIPOP) {
spinnerDelegateClass = Class.forName("android.widget.TimePickerSpinnerDelegate");
} else {
// TimePickerSpinnerDelegate was initially misnamed in API 21!
spinnerDelegateClass = Class.forName("android.widget.TimePickerClockDelegate");
}

spinnerDelegateClass = Class.forName("android.widget.TimePickerSpinnerDelegate");
// In 7.0 Nougat for some reason the timePickerMode is ignored and the
// delegate is TimePickerClockDelegate
if (delegate.getClass() != spinnerDelegateClass) {
Expand Down

0 comments on commit bcc613b

Please sign in to comment.