lets catch the occasional exception at unregistering the widget Bus
This commit is contained in:
parent
6a6fd45285
commit
cdc4de85ed
1 changed files with 6 additions and 2 deletions
|
@ -105,7 +105,11 @@ public class MyWidgetProvider extends AppWidgetProvider {
|
|||
@Override
|
||||
public void onDeleted(Context context, int[] appWidgetIds) {
|
||||
super.onDeleted(context, appWidgetIds);
|
||||
if (bus != null)
|
||||
bus.unregister(this);
|
||||
if (bus != null) {
|
||||
try {
|
||||
bus.unregister(this);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue