Skip to content

Commit

Permalink
Adding @nullable annotation for parameters in ActivityController.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 351705328
  • Loading branch information
romkal authored and hoisie committed Jan 16, 2021
1 parent 721b09b commit ca89433
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit ca89433

Please sign in to comment.