add a null check at widget updating
This commit is contained in:
parent
78fed3e844
commit
02bb7c570d
|
@ -68,8 +68,10 @@ class MyWidgetMonthlyProvider : AppWidgetProvider(), MonthlyCalendar {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateWidget() {
|
private fun updateWidget() {
|
||||||
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
if (mRemoteViews != null) {
|
||||||
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
val thisWidget = ComponentName(mContext, MyWidgetMonthlyProvider::class.java)
|
||||||
|
AppWidgetManager.getInstance(mContext).updateAppWidget(thisWidget, mRemoteViews)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupIntent(action: String, id: Int) {
|
private fun setupIntent(action: String, id: Int) {
|
||||||
|
|
Loading…
Reference in New Issue