Remove LocalBroadcastReceiver
[fonbot.git] / src / ro / ieval / fonbot / Heavy.java
index 6e91f2f1fbbd61c173ad4105ffb48cd1189b9909..f734437f4c452d8c3ee8dc11f25db109dbfa11f1 100644 (file)
@@ -1519,9 +1519,9 @@ final class Heavy {
         */
        public static void poll(final Context context, final Address replyTo, final long ms){
                final AlarmManager man=(AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
-               final Intent pollAlarm=new Intent(context, LocalBroadcastReceiver.class);
-               pollAlarm.setAction(LocalBroadcastReceiver.ACTION_POLL_ALARM);
-               final PendingIntent intent=PendingIntent.getBroadcast(context, 0, pollAlarm, 0);
+               final Intent pollAlarm=new Intent(context, FonBotMainService.class);
+               pollAlarm.setAction(FonBotMainService.ACTION_TRIGGER_POLL);
+               final PendingIntent intent=PendingIntent.getService(context, 0, pollAlarm, 0);
                if(ms==0){
                        Utils.unregisterOngoing(context, toNonNull(OngoingEvent.POLL));
                        man.cancel(intent);
This page took 0.009509 seconds and 4 git commands to generate.