make sure the widget gets updated when the time/timezone or alarm changes
This commit is contained in:
parent
1c29b08ef7
commit
0626a9be26
|
@ -106,5 +106,13 @@
|
|||
android:name="android.appwidget.provider"
|
||||
android:resource="@xml/widget_date_time_info"/>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receivers.UpdateWidgetReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.TIME_SET"/>
|
||||
<action android:name="android.intent.action.TIMEZONE_CHANGED"/>
|
||||
<action android:name="android.app.action.NEXT_ALARM_CLOCK_CHANGED"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.simplemobiletools.clock.receivers
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.simplemobiletools.clock.extensions.updateWidgets
|
||||
|
||||
class UpdateWidgetReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
context.updateWidgets()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue