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.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 {
|
|
||||||
FirebaseInstanceId.getInstance().deleteInstanceId();
|
|
||||||
final Intent intent = new Intent(context, XmppConnectionService.class);
|
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();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue