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