lets catch the occasional exception at unregistering the widget Bus

This commit is contained in:
tibbi 2016-01-20 23:42:59 +01:00
parent 6a6fd45285
commit cdc4de85ed

View file

@ -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) {
}
}
}
}