Skip to content

Commit

Permalink
Use RequiresApi
Browse files Browse the repository at this point in the history
  • Loading branch information
NightlyNexus committed Feb 3, 2017
1 parent a71e8f2 commit 50f89d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
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'
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

0 comments on commit 50f89d4

Please sign in to comment.