@Test public void extractResult_shouldReturnNullIfIntentDoesNotHaveExtra() throws Exception { assertThat(LocationResult.extractResult(new Intent())).isNull(); }
public static LocationResult extractResult(Intent intent) { if (!hasResult(intent)) { return null; } return intent.getParcelableExtra(EXTRA_LOCATION_RESULT); }
LocationResult implements Parcelable { public static LocationResult extractResult(Intent intent) { if (!hasResult(intent)) { return null; } return intent.getParcelableExtra(EXTRA_LOCATION_RESULT); } }
LocationResult implements Parcelable { public static LocationResult extractResult(Intent intent) { if (!hasResult(intent)) { return null; } return intent.getParcelableExtra(EXTRA_LOCATION_RESULT); } LocationResult(List<Location> locations); protected  LocationResult(Parcel in); }
LocationResult implements Parcelable { public static LocationResult extractResult(Intent intent) { if (!hasResult(intent)) { return null; } return intent.getParcelableExtra(EXTRA_LOCATION_RESULT); } LocationResult(List<Location> locations); protected  LocationResult(Parcel in); static LocationResult create(List<Location> locations); @NonNull List<Location> getLocations(); Location getLastLocation(); static boolean hasResult(Intent intent); static LocationResult extractResult(Intent intent); @Override boolean equals(Object o); @Override int hashCode(); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); }
LocationResult implements Parcelable { public static LocationResult extractResult(Intent intent) { if (!hasResult(intent)) { return null; } return intent.getParcelableExtra(EXTRA_LOCATION_RESULT); } LocationResult(List<Location> locations); protected  LocationResult(Parcel in); static LocationResult create(List<Location> locations); @NonNull List<Location> getLocations(); Location getLastLocation(); static boolean hasResult(Intent intent); static LocationResult extractResult(Intent intent); @Override boolean equals(Object o); @Override int hashCode(); @Override void writeToParcel(Parcel dest, int flags); @Override int describeContents(); static final String EXTRA_LOCATION_RESULT; static final Creator<LocationResult> CREATOR; }