add a try/catch block around updating the app widget
This commit is contained in:
parent
935c499b95
commit
c9a342f516
|
@ -77,7 +77,10 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
||||||
|
|
||||||
private fun updateWidget() {
|
private fun updateWidget() {
|
||||||
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
||||||
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
try {
|
||||||
|
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupIntent(action: String, id: Int) {
|
private fun setupIntent(action: String, id: Int) {
|
||||||
|
|
Loading…
Reference in New Issue