add a try/catch block around updating the app widget

This commit is contained in:
tibbi 2017-07-06 21:45:20 +02:00
parent 935c499b95
commit c9a342f516

View file

@ -77,7 +77,10 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
private fun updateWidget() {
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) {