copy intent extras in eventreceiver

This commit is contained in:
Daniel Gultsch 2019-02-27 14:16:26 +01:00
parent 417a6e8307
commit a29a5fd491
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package eu.siacs.conversations.services;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.v4.content.ContextCompat;
import android.util.Log;
@ -20,6 +21,10 @@ public class EventReceiver extends BroadcastReceiver {
final Intent intentForService = new Intent(context, XmppConnectionService.class);
if (originalIntent.getAction() != null) {
intentForService.setAction(originalIntent.getAction());
final Bundle extras = originalIntent.getExtras();
if (extras != null) {
intentForService.putExtras(extras);
}
} else {
intentForService.setAction("other");
}