From 50f89d4e4bba7c4db3dd5bad90182f1fa66e709a Mon Sep 17 00:00:00 2001 From: Eric Cochran Date: Thu, 2 Feb 2017 17:13:18 -0800 Subject: [PATCH] Use RequiresApi --- .travis.yml | 4 ++-- build.gradle | 8 ++++---- .../f2prateek/rx/preferences2/RxSharedPreferences.java | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index e73c553..d950d91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,8 @@ android: components: - tools - platform-tools - - build-tools-25.0.0 - - android-24 + - build-tools-25.0.2 + - android-25 - extra-android-m2repository jdk: diff --git a/build.gradle b/build.gradle index 9b77cf6..ae5c009 100644 --- a/build.gradle +++ b/build.gradle @@ -21,15 +21,15 @@ allprojects { ext { minSdkVersion = 9 - targetSdkVersion = 24 - compileSdkVersion = 24 - buildToolsVersion = '25.0.0' + targetSdkVersion = 25 + compileSdkVersion = 25 + buildToolsVersion = '25.0.2' javaVersion = JavaVersion.VERSION_1_7 java8Version = JavaVersion.VERSION_1_8 } ext.deps = [ - annotations: 'com.android.support:support-annotations:23.1.1', + annotations: 'com.android.support:support-annotations:25.1.1', rxjava: 'io.reactivex.rxjava2:rxjava:2.0.3', rxandroid: 'io.reactivex.rxjava2:rxandroid:2.0.1', rxbinding: 'com.jakewharton.rxbinding:rxbinding:0.3.0', diff --git a/rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java b/rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java index 0db7524..d49915c 100644 --- a/rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java +++ b/rx-preferences/src/main/java/com/f2prateek/rx/preferences2/RxSharedPreferences.java @@ -1,11 +1,11 @@ package com.f2prateek.rx.preferences2; -import android.annotation.TargetApi; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.support.annotation.CheckResult; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.annotation.RequiresApi; import io.reactivex.Observable; import io.reactivex.ObservableEmitter; import io.reactivex.ObservableOnSubscribe; @@ -157,14 +157,14 @@ public Preference getString(@NonNull String key, @Nullable String defaul } /** Create a string set preference for {@code key}. Default is an empty set. */ - @TargetApi(HONEYCOMB) + @RequiresApi(HONEYCOMB) @CheckResult @NonNull public Preference> getStringSet(@NonNull String key) { return getStringSet(key, Collections.emptySet()); } /** Create a string set preference for {@code key} with a default of {@code defaultValue}. */ - @TargetApi(HONEYCOMB) + @RequiresApi(HONEYCOMB) @CheckResult @NonNull public Preference> getStringSet(@NonNull String key, @NonNull Set defaultValue) {