Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RequiresApi #68

Merged
merged 1 commit into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ allprojects {

ext {
minSdkVersion = 9
targetSdkVersion = 24
compileSdkVersion = 24
buildToolsVersion = '25.0.0'
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Travis yml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ i always forget.

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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -157,14 +157,14 @@ public Preference<String> 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<Set<String>> getStringSet(@NonNull String key) {
return getStringSet(key, Collections.<String>emptySet());
}

/** Create a string set preference for {@code key} with a default of {@code defaultValue}. */
@TargetApi(HONEYCOMB)
@RequiresApi(HONEYCOMB)
@CheckResult @NonNull
public Preference<Set<String>> getStringSet(@NonNull String key,
@NonNull Set<String> defaultValue) {
Expand Down