bump guava library

This commit is contained in:
Daniel Gultsch 2022-08-22 11:29:04 +02:00
parent c2d37f4359
commit e8736d5f1b
4 changed files with 12 additions and 21 deletions

View file

@ -6,7 +6,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.2.1' classpath 'com.android.tools.build:gradle:7.2.2'
} }
} }
@ -73,7 +73,7 @@ dependencies {
implementation "com.squareup.retrofit2:converter-gson:2.9.0" implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.okhttp3:okhttp:4.10.0" implementation "com.squareup.okhttp3:okhttp:4.10.0"
implementation 'com.google.guava:guava:30.1.1-android' implementation 'com.google.guava:guava:31.1-android'
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.49' quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.12.49'
freeImplementation 'ch.threema:webrtc-android:100.0.0' freeImplementation 'ch.threema:webrtc-android:100.0.0'
playstoreImplementation fileTree(include: ['libwebrtc-m104.aar'], dir: 'libs') playstoreImplementation fileTree(include: ['libwebrtc-m104.aar'], dir: 'libs')

View file

@ -2,14 +2,14 @@ package eu.siacs.conversations.http;
import android.util.Log; import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.MoreExecutors;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.jetbrains.annotations.NotNull;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -132,7 +132,7 @@ public class HttpUploadConnection implements Transferable, AbstractConnectionMan
this.slotFuture = new SlotRequester(mXmppConnectionService).request(method, account, file, mime); this.slotFuture = new SlotRequester(mXmppConnectionService).request(method, account, file, mime);
Futures.addCallback(this.slotFuture, new FutureCallback<SlotRequester.Slot>() { Futures.addCallback(this.slotFuture, new FutureCallback<SlotRequester.Slot>() {
@Override @Override
public void onSuccess(@NullableDecl SlotRequester.Slot result) { public void onSuccess(@Nullable SlotRequester.Slot result) {
HttpUploadConnection.this.slot = result; HttpUploadConnection.this.slot = result;
try { try {
HttpUploadConnection.this.upload(); HttpUploadConnection.this.upload();
@ -142,7 +142,7 @@ public class HttpUploadConnection implements Transferable, AbstractConnectionMan
} }
@Override @Override
public void onFailure(@NotNull final Throwable throwable) { public void onFailure(@NonNull final Throwable throwable) {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": unable to request slot", throwable); Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": unable to request slot", throwable);
// TODO consider fall back to jingle in 1-on-1 chats with exactly one online presence // TODO consider fall back to jingle in 1-on-1 chats with exactly one online presence
fail(throwable.getMessage()); fail(throwable.getMessage());
@ -169,13 +169,13 @@ public class HttpUploadConnection implements Transferable, AbstractConnectionMan
this.mostRecentCall = client.newCall(request); this.mostRecentCall = client.newCall(request);
this.mostRecentCall.enqueue(new Callback() { this.mostRecentCall.enqueue(new Callback() {
@Override @Override
public void onFailure(@NotNull Call call, IOException e) { public void onFailure(@NonNull Call call, IOException e) {
Log.d(Config.LOGTAG, "http upload failed", e); Log.d(Config.LOGTAG, "http upload failed", e);
fail(e.getMessage()); fail(e.getMessage());
} }
@Override @Override
public void onResponse(@NotNull Call call, @NotNull Response response) { public void onResponse(@NonNull Call call, @NonNull Response response) {
final int code = response.code(); final int code = response.code();
if (code == 200 || code == 201) { if (code == 200 || code == 201) {
Log.d(Config.LOGTAG, "finished uploading file"); Log.d(Config.LOGTAG, "finished uploading file");

View file

@ -25,6 +25,7 @@ import android.view.WindowManager;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi; import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes; import androidx.annotation.StringRes;
import androidx.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
@ -37,7 +38,6 @@ import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.Futures;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.webrtc.RendererCommon; import org.webrtc.RendererCommon;
import org.webrtc.SurfaceViewRenderer; import org.webrtc.SurfaceViewRenderer;
import org.webrtc.VideoTrack; import org.webrtc.VideoTrack;
@ -999,7 +999,7 @@ public class RtpSessionActivity extends XmppActivity
requireRtpConnection().switchCamera(), requireRtpConnection().switchCamera(),
new FutureCallback<Boolean>() { new FutureCallback<Boolean>() {
@Override @Override
public void onSuccess(@NullableDecl Boolean isFrontCamera) { public void onSuccess(@Nullable Boolean isFrontCamera) {
binding.localVideo.setMirror(isFrontCamera); binding.localVideo.setMirror(isFrontCamera);
} }

View file

@ -1,6 +1,5 @@
package eu.siacs.conversations.xmpp.jingle; package eu.siacs.conversations.xmpp.jingle;
import com.google.common.base.Function;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import com.google.common.collect.Collections2; import com.google.common.collect.Collections2;
@ -11,8 +10,6 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -292,13 +289,7 @@ public class RtpContentMap {
return ImmutableMap.copyOf( return ImmutableMap.copyOf(
Maps.transformValues( Maps.transformValues(
contents, contents,
new Function<Content, DescriptionTransport>() { content -> content == null ? null : of(content)));
@NullableDecl
@Override
public DescriptionTransport apply(@NullableDecl Content content) {
return content == null ? null : of(content);
}
}));
} }
} }