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

Adding @Nullable annotation for parameters in ActivityController. #6159

Merged
merged 1 commit into from
Jan 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private ActivityInfo getActivityInfo(Application application) {
}
}

public ActivityController<T> create(final Bundle bundle) {
public ActivityController<T> create(@Nullable final Bundle bundle) {
shadowMainLooper.runPaused(() -> getInstrumentation().callActivityOnCreate(component, bundle));
return this;
}
Expand Down Expand Up @@ -140,7 +140,7 @@ public ActivityController<T> restoreInstanceState(Bundle bundle) {
return this;
}

public ActivityController<T> postCreate(Bundle bundle) {
public ActivityController<T> postCreate(@Nullable Bundle bundle) {
invokeWhilePaused("onPostCreate", from(Bundle.class, bundle));
return this;
}
Expand Down Expand Up @@ -265,12 +265,13 @@ public ActivityController<T> setup() {
}

/**
* Calls the same lifecycle methods on the Activity called by Android when an Activity is restored from previously saved state.
* Calls the same lifecycle methods on the Activity called by Android when an Activity is restored
* from previously saved state.
*
* @param savedInstanceState Saved instance state.
* @return Activity controller instance.
*/
public ActivityController<T> setup(Bundle savedInstanceState) {
public ActivityController<T> setup(@Nullable Bundle savedInstanceState) {
return create(savedInstanceState)
.start()
.restoreInstanceState(savedInstanceState)
Expand Down