Don't allow null extras in fragment pager adapter

pull/14/head
Sam Bosley 13 years ago
parent fec9d72bea
commit 5a413c4553

@ -106,12 +106,13 @@ public class TaskListFragmentPagerAdapter extends FragmentStatePagerAdapter impl
// Constructs extras corresponding to the specified filter that can be used as arguments to the fragment // Constructs extras corresponding to the specified filter that can be used as arguments to the fragment
private Bundle getExtrasForFilter(Filter filter) { private Bundle getExtrasForFilter(Filter filter) {
Bundle extras; Bundle extras = null;
if (filter instanceof FilterWithCustomIntent) { if (filter instanceof FilterWithCustomIntent)
extras = ((FilterWithCustomIntent) filter).customExtras; extras = ((FilterWithCustomIntent) filter).customExtras;
} else {
if (extras == null)
extras = new Bundle(); extras = new Bundle();
}
if (filter != null) if (filter != null)
extras.putParcelable(TaskListFragment.TOKEN_FILTER, filter); extras.putParcelable(TaskListFragment.TOKEN_FILTER, filter);
return extras; return extras;

Loading…
Cancel
Save