app/src/main/java/com/example/android/quakereport/EarthquakeActivity.java
/**
         * This method runs on a background thread and performs the network request.
         * We should not update the UI from a background thread, so we return a list of
         * {@link Earthquake}s as the result.
         */
This method runs on a background thread and performs the network request.
We should not update the UI from a background thread, so we return a list of
Earthquakes as the result.
This method runs on a background thread and performs the network request . We should not update the UI from a background thread so we return a list of Earthquakes as the result .
@Override
        protected List<Earthquake> doInBackground(String... urls) {
            if (urls.length < 1 || urls[0] == null) {
                return null;
            }
            List<Earthquake> result = QueryUtils.fetchEarthquakes(urls[0]);
            return result;
        }
@ Override protected List < Earthquake > doInBackground ( String ... urls ) { if ( urls . length < 1 || urls [ 0 ] == null ) { return null ; } List < Earthquake > result = QueryUtils . fetchEarthquakes ( urls [ 0 ] ) ; return result ; }
This method runs on a background thread and performs the network request.
This method runs on a background thread and performs the network request .
// Don't perform the request if there are no URLs, or the first URL is null.