Skip to content

Commit

Permalink
Downgrade minVersionApi to 14
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-knyazev committed Aug 7, 2019
1 parent fa15749 commit c5e8e39
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
compileSdkVersion 28
defaultConfig {
applicationId "com.omegar.simple.omegalaunchers"
minSdkVersion 16
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
Expand Down
2 changes: 1 addition & 1 deletion omegalauncherslib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {


defaultConfig {
minSdkVersion 16
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Activity
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.os.Parcelable
import android.util.AndroidRuntimeException
Expand Down Expand Up @@ -86,7 +87,11 @@ class ActivityLauncher(
}

private fun Activity.compatStartActivityForResult(intent: Intent, requestCode: Int, option: Bundle? = null) {
startActivityForResult(intent, requestCode, option)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
startActivityForResult(intent, requestCode, option)
} else {
startActivityForResult(intent, requestCode)
}
}

fun getPendingIntent(
Expand Down

0 comments on commit c5e8e39

Please sign in to comment.