mirror of
https://gitlab.com/oeffi/oeffi.git
synced 2025-07-06 17:38:48 +00:00
Update Guava to 26.0-android.
This commit is contained in:
parent
86681291b2
commit
c4ab2ac395
3 changed files with 6 additions and 4 deletions
|
@ -16,7 +16,7 @@ dependencies {
|
|||
compile 'com.android.support:drawerlayout:28.0.0'
|
||||
compile 'com.squareup.okhttp3:okhttp:3.11.0'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.11.0'
|
||||
compile 'com.google.guava:guava:25.1-android'
|
||||
compile 'com.google.guava:guava:26.0-android'
|
||||
compile 'org.slf4j:slf4j-api:1.7.25'
|
||||
compile 'com.github.tony19:logback-android:1.1.1-8'
|
||||
compile 'com.google.code.findbugs:jsr305:3.0.0'
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
|
||||
import de.schildbach.oeffi.Constants;
|
||||
import de.schildbach.oeffi.util.Downloader;
|
||||
|
@ -127,13 +128,13 @@ public class PlanContentProvider extends ContentProvider {
|
|||
final HttpUrl remoteIndexUrl = Constants.PLANS_BASE_URL.newBuilder()
|
||||
.addPathSegment(Constants.PLAN_INDEX_FILENAME).build();
|
||||
final ListenableFuture<Integer> download = downloader.download(remoteIndexUrl, indexFile);
|
||||
Futures.addCallback(download, notifyChangeCallback);
|
||||
Futures.addCallback(download, notifyChangeCallback, MoreExecutors.directExecutor());
|
||||
|
||||
final File stationsFile = new File(getContext().getFilesDir(), Constants.PLAN_STATIONS_FILENAME);
|
||||
final HttpUrl remoteStationsUrl = Constants.PLANS_BASE_URL.newBuilder()
|
||||
.addPathSegment(Constants.PLAN_STATIONS_FILENAME + ".bz2").build();
|
||||
final ListenableFuture<Integer> stationsDownload = downloader.download(remoteStationsUrl, stationsFile, true);
|
||||
Futures.addCallback(stationsDownload, notifyChangeCallback);
|
||||
Futures.addCallback(stationsDownload, notifyChangeCallback, MoreExecutors.directExecutor());
|
||||
|
||||
final List<String> pathSegments = uri.getPathSegments();
|
||||
if (pathSegments.size() <= 2) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
|
|||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import com.google.common.util.concurrent.Futures;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
|
||||
import de.schildbach.oeffi.Constants;
|
||||
import de.schildbach.oeffi.util.Downloader;
|
||||
|
@ -112,7 +113,7 @@ public final class NetworkContentProvider extends ContentProvider {
|
|||
|
||||
public void onFailure(final Throwable t) {
|
||||
}
|
||||
});
|
||||
}, MoreExecutors.directExecutor());
|
||||
|
||||
if (!dbFile.exists())
|
||||
return null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue