Skip to content

Commit

Permalink
Merge pull request #85 from trello/dlew/more-annotations
Browse files Browse the repository at this point in the history
Also spruced up annotations on NaviLifecycle
  • Loading branch information
dlew committed Feb 22, 2016
2 parents 5e9492f + 6ebb459 commit 0b3f3d7
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
package com.trello.rxlifecycle.navi;

import android.support.annotation.CheckResult;
import android.support.annotation.NonNull;
import com.trello.navi.NaviComponent;
import com.trello.rxlifecycle.ActivityLifecycleProvider;
import com.trello.rxlifecycle.FragmentLifecycleProvider;

import static com.trello.rxlifecycle.internal.Preconditions.checkNotNull;

public final class NaviLifecycle {

public static ActivityLifecycleProvider createActivityLifecycleProvider(NaviComponent activity) {
@NonNull
@CheckResult
public static ActivityLifecycleProvider createActivityLifecycleProvider(@NonNull NaviComponent activity) {
checkNotNull(activity, "activity == null");
return new ActivityLifecycleProviderImpl(activity);
}

public static FragmentLifecycleProvider createFragmentLifecycleProvider(NaviComponent fragment) {
@NonNull
@CheckResult
public static FragmentLifecycleProvider createFragmentLifecycleProvider(@NonNull NaviComponent fragment) {
checkNotNull(fragment, "fragment == null");
return new FragmentLifecycleProviderImpl(fragment);
}

Expand Down

0 comments on commit 0b3f3d7

Please sign in to comment.