Skip to content

Commit

Permalink
Merge pull request #286 from hotchemi/update_library
Browse files Browse the repository at this point in the history
Update minSdkVersion and dependent support lib ver
  • Loading branch information
hotchemi authored Mar 9, 2017
2 parents d2c183b + fcf0d4b commit 34b7e4c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android:
components:
- tools
- platform-tools
- build-tools-23.0.2
- android-23
- build-tools-25.0.2
- android-25
- extra-google-google_play_services
- extra-android-m2repository
- extra-android-support
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONFIG_PLUGIN_VERSION=2.2.2
JFROG_PLUGIN_VERSION=4.1.1

# Dependency versions
SUPPORT_LIBRARY_VERSION=23.1.1
SUPPORT_LIBRARY_VERSION=25.1.1
JAVAPOET_VERSION=1.7.0
JUNIT_VERSION=4.12
MOCKITO_VERSION=1.10.19
Expand All @@ -29,10 +29,10 @@ GOOGLE_ANDROID_VERSION=4.1.1.4
LINT_VERSION=25.2.0

# Android configuration
COMPILE_SDK_VERSION=android-23
BUILD_TOOLS_VERSION=23.0.2
LIBRARY_MIN_SDK_VERSION=4
SAMPLE_MIN_SDK_VERSION=10
COMPILE_SDK_VERSION=android-25
BUILD_TOOLS_VERSION=25.0.2
LIBRARY_MIN_SDK_VERSION=9
SAMPLE_MIN_SDK_VERSION=9

# Gradle parameters
org.gradle.daemon=true
Expand Down
2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
minSdkVersion LIBRARY_MIN_SDK_VERSION
targetSdkVersion 23
targetSdkVersion 25
consumerProguardFiles 'proguard-rules.txt'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package permissions.dispatcher.v13;

import android.app.Fragment;
import android.os.Build;
import android.support.annotation.RequiresApi;
import android.support.v13.app.FragmentCompat;

public final class V13Access {
Expand All @@ -15,6 +17,7 @@ public final class V13Access {
* @param permissions permission list
* @return returns true if one of the permission is needed to show rationale.
*/
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB_MR2)
public boolean shouldShowRequestPermissionRationale(Fragment fragment, String... permissions) {
for (String permission : permissions) {
if (FragmentCompat.shouldShowRequestPermissionRationale(fragment, permission)) {
Expand All @@ -31,6 +34,7 @@ public boolean shouldShowRequestPermissionRationale(Fragment fragment, String...
* @param permissions permissions list
* @param requestCode Request code connected to the permission request
*/
@RequiresApi(api = Build.VERSION_CODES.HONEYCOMB_MR2)
public void requestPermissions(Fragment fragment, String[] permissions, int requestCode) {
FragmentCompat.requestPermissions(fragment, permissions, requestCode);
}
Expand Down

0 comments on commit 34b7e4c

Please sign in to comment.