Use unique alarm intents

pull/156/head
M66B 6 years ago
parent 3d7e4e0d75
commit 7150d32872

@ -60,6 +60,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.Random;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.RejectedExecutionException;
@ -1050,7 +1051,7 @@ public class ServiceSynchronize extends LifecycleService {
} }
}; };
String id = BuildConfig.APPLICATION_ID + ".POLL." + account.id; String id = BuildConfig.APPLICATION_ID + ".POLL." + account.id + "." + new Random().nextInt();
PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(id), 0); PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(id), 0);
registerReceiver(alarm, new IntentFilter(id)); registerReceiver(alarm, new IntentFilter(id));
@ -1175,7 +1176,7 @@ public class ServiceSynchronize extends LifecycleService {
} }
}; };
String id = BuildConfig.APPLICATION_ID + ".BACKOFF." + account.id; String id = BuildConfig.APPLICATION_ID + ".BACKOFF." + account.id + "." + new Random().nextInt();
PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(id), 0); PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(id), 0);
registerReceiver(alarm, new IntentFilter(id)); registerReceiver(alarm, new IntentFilter(id));

Loading…
Cancel
Save