mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 07:32:08 +01:00
Prevent crash
This commit is contained in:
@@ -59,7 +59,12 @@ public class Widget extends AppWidgetProvider {
|
||||
|
||||
static void update(Context context, Integer count) {
|
||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||
int[] appWidgetIds = AppWidgetManager.getInstance(context).getAppWidgetIds(new ComponentName(context, Widget.class));
|
||||
if (appWidgetManager == null) {
|
||||
Log.w("No app widget manager"); // Fairphone FP2
|
||||
return;
|
||||
}
|
||||
|
||||
int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, Widget.class));
|
||||
update(context, appWidgetManager, appWidgetIds, count);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user