Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7bd5719 authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Add intents in the broadcast listener of the widget

bug: 7511464
Added intents to listen to TIME_TICK, time changes and screen on in order to update the
next alarm info and the city's day in the alarm clock.
Listening to to TIME_TICK is not needed for the clock but it is needed to update
the day in the world clock when the time passes midnight in a selected city.

Change-Id: Id07a4a0d6722adb9c896b1f7f1c71c594e500523
parent 0d45ace3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -174,6 +174,11 @@ public class DigitalWidgetViewsFactory extends BroadcastReceiver implements Remo
        // new factory
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_DATE_CHANGED);
        filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
        filter.addAction(Intent.ACTION_SCREEN_ON);
        filter.addAction(Intent.ACTION_TIME_TICK);
        filter.addAction(Intent.ACTION_TIME_CHANGED);
        filter.addAction(Intent.ACTION_LOCALE_CHANGED);
        filter.addAction("com.android.deskclock.NEXT_ALARM_TIME_SET");
        filter.addAction("com.android.deskclock.worldclock.update");
        mContext.registerReceiver(this, filter);