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

Also spruced up annotations on NaviLifecycle #85

Merged
merged 1 commit into from
Feb 22, 2016
Merged
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
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