bump various libraries that have been waiting for androidx

This commit is contained in:
Daniel Gultsch 2021-01-18 21:49:31 +01:00
parent 453ca7c0ed
commit 91cc8f5011
3 changed files with 22 additions and 24 deletions

View file

@ -34,27 +34,24 @@ dependencies {
implementation 'androidx.viewpager:viewpager:1.0.0' implementation 'androidx.viewpager:viewpager:1.0.0'
//should remain that low because later versions introduce dependency to androidx (not sure exactly from what version) //should remain that low because later versions introduce dependency to androidx (not sure exactly from what version)
playstoreImplementation('com.google.firebase:firebase-messaging:17.3.4') { playstoreImplementation('com.google.firebase:firebase-messaging:21.0.1') {
exclude group: 'com.google.firebase', module: 'firebase-core' exclude group: 'com.google.firebase', module: 'firebase-core'
exclude group: 'com.google.firebase', module: 'firebase-analytics' exclude group: 'com.google.firebase', module: 'firebase-analytics'
exclude group: 'com.google.firebase', module: 'firebase-measurement-connector' exclude group: 'com.google.firebase', module: 'firebase-measurement-connector'
} }
conversationsPlaystoreCompatImplementation("com.android.installreferrer:installreferrer:1.1.2") conversationsPlaystoreCompatImplementation("com.android.installreferrer:installreferrer:2.2")
conversationsPlaystoreSystemImplementation("com.android.installreferrer:installreferrer:1.1.2") conversationsPlaystoreSystemImplementation("com.android.installreferrer:installreferrer:2.2")
implementation 'org.sufficientlysecure:openpgp-api:10.0' implementation 'org.sufficientlysecure:openpgp-api:10.0'
implementation('com.theartofdev.edmodo:android-image-cropper:2.7.+') { implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
exclude group: 'com.android.support', module: 'appcompat-v7' implementation 'androidx.appcompat:appcompat:1.2.0'
exclude group: 'com.android.support', module: 'exifinterface' implementation 'androidx.exifinterface:exifinterface:1.3.2'
}
//implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.emoji:emoji:1.0.0' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.emoji:emoji:1.1.0'
compatImplementation 'androidx.emoji:emoji-appcompat:1.0.0' implementation 'com.google.android.material:material:1.2.1'
conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.0.0' compatImplementation 'androidx.emoji:emoji-appcompat:1.1.0'
quicksyFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.0.0' conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
quicksyFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
implementation 'org.bouncycastle:bcmail-jdk15on:1.64' implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
//zxing stopped supporting Java 7 so we have to stick with 3.3.3 //zxing stopped supporting Java 7 so we have to stick with 3.3.3
//https://github.com/zxing/zxing/issues/1170 //https://github.com/zxing/zxing/issues/1170

View file

@ -376,6 +376,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override @Override
public void onNewIntent(final Intent intent) { public void onNewIntent(final Intent intent) {
super.onNewIntent(intent);
if (xmppConnectionServiceBound) { if (xmppConnectionServiceBound) {
processViewIntent(intent); processViewIntent(intent);
} else { } else {

View file

@ -4,8 +4,7 @@ import android.util.Log;
import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability; import com.google.android.gms.common.GoogleApiAvailability;
import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.messaging.FirebaseMessaging;
import com.google.firebase.iid.InstanceIdResult;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
@ -55,7 +54,7 @@ public class PushManagementService {
e.printStackTrace(); e.printStackTrace();
} }
} else { } else {
Log.d(Config.LOGTAG, a.getJid().asBareJid() + ": failed to enable push. invalid response from app server "+response); Log.d(Config.LOGTAG, a.getJid().asBareJid() + ": failed to enable push. invalid response from app server " + response);
} }
}); });
}); });
@ -73,18 +72,19 @@ public class PushManagementService {
} }
private void retrieveFcmInstanceToken(final OnGcmInstanceTokenRetrieved instanceTokenRetrieved) { private void retrieveFcmInstanceToken(final OnGcmInstanceTokenRetrieved instanceTokenRetrieved) {
final FirebaseInstanceId firebaseInstanceId; final FirebaseMessaging firebaseMessaging;
try { try {
firebaseInstanceId = FirebaseInstanceId.getInstance(); firebaseMessaging = FirebaseMessaging.getInstance();
;
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
Log.d(Config.LOGTAG, "unable to get firebase instance token ",e); Log.d(Config.LOGTAG, "unable to get firebase instance token ", e);
return; return;
} }
firebaseInstanceId.getInstanceId().addOnCompleteListener(task -> { firebaseMessaging.getToken().addOnCompleteListener(task -> {
if (!task.isSuccessful()) { if (!task.isSuccessful()) {
Log.d(Config.LOGTAG, "unable to get Firebase instance token", task.getException()); Log.d(Config.LOGTAG, "unable to get Firebase instance token", task.getException());
} }
final InstanceIdResult result; final String result;
try { try {
result = task.getResult(); result = task.getResult();
} catch (Exception e) { } catch (Exception e) {
@ -92,7 +92,7 @@ public class PushManagementService {
return; return;
} }
if (result != null) { if (result != null) {
instanceTokenRetrieved.onGcmInstanceTokenRetrieved(result.getToken()); instanceTokenRetrieved.onGcmInstanceTokenRetrieved(result);
} }
}); });