update some libraries

This commit is contained in:
Daniel Gultsch 2021-05-13 10:27:05 +02:00
parent d91cd3e9e8
commit 2b9862adea
1 changed files with 4 additions and 12 deletions

View File

@ -5,9 +5,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.util.Log; import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.installations.FirebaseInstallations;
import java.io.IOException;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.utils.Compatibility; import eu.siacs.conversations.utils.Compatibility;
@ -23,16 +21,10 @@ public class MaintenanceReceiver extends BroadcastReceiver {
} }
private void renewInstanceToken(final Context context) { private void renewInstanceToken(final Context context) {
new Thread(() -> { FirebaseInstallations.getInstance().delete().addOnSuccessListener(unused -> {
try { final Intent intent = new Intent(context, XmppConnectionService.class);
FirebaseInstanceId.getInstance().deleteInstanceId();
final Intent intent = new Intent(context, XmppConnectionService.class);
intent.setAction(XmppConnectionService.ACTION_FCM_TOKEN_REFRESH); intent.setAction(XmppConnectionService.ACTION_FCM_TOKEN_REFRESH);
Compatibility.startService(context, intent); Compatibility.startService(context, intent);
} catch (IOException e) { });
Log.d(Config.LOGTAG, "unable to renew instance token", e);
}
}).start();
} }
} }