add a try/catch block around updating the app widget
This commit is contained in:
parent
935c499b95
commit
c9a342f516
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue