Incorporate feedback

This commit is contained in:
cketti 2017-02-17 22:45:40 +01:00
parent fb5fb2553b
commit 0a3a91436e
4 changed files with 6 additions and 5 deletions

View file

@ -587,12 +587,12 @@ public class K9 extends Application {
private void updateMailListWidget() { private void updateMailListWidget() {
try { try {
MessageListWidgetProvider.updateMailViewList(K9.this); MessageListWidgetProvider.triggerMessageListWidgetUpdate(K9.this);
} catch (Exception e) { } catch (RuntimeException e) {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
throw e; throw e;
} else if (K9.DEBUG) { } else if (K9.DEBUG) {
Log.e(LOG_TAG, "Error whiile updating mail list widget", e); Log.e(LOG_TAG, "Error while updating message list widget", e);
} }
} }
} }

View file

@ -94,6 +94,7 @@ public class MessageListRemoteViewFactory implements RemoteViewsService.RemoteVi
@Override @Override
public void onDestroy() { public void onDestroy() {
// Implement interface
} }
@Override @Override

View file

@ -19,7 +19,7 @@ public class MessageListWidgetProvider extends AppWidgetProvider {
private static String ACTION_UPDATE_MESSAGE_LIST = "UPDATE_MESSAGE_LIST"; private static String ACTION_UPDATE_MESSAGE_LIST = "UPDATE_MESSAGE_LIST";
public static void updateMailViewList(Context context) { public static void triggerMessageListWidgetUpdate(Context context) {
Context appContext = context.getApplicationContext(); Context appContext = context.getApplicationContext();
AppWidgetManager widgetManager = AppWidgetManager.getInstance(appContext); AppWidgetManager widgetManager = AppWidgetManager.getInstance(appContext);
ComponentName widget = new ComponentName(appContext, MessageListWidgetProvider.class); ComponentName widget = new ComponentName(appContext, MessageListWidgetProvider.class);

View file

@ -8,6 +8,6 @@ import android.widget.RemoteViewsService;
public class MessageListWidgetService extends RemoteViewsService { public class MessageListWidgetService extends RemoteViewsService {
@Override @Override
public RemoteViewsFactory onGetViewFactory(Intent intent) { public RemoteViewsFactory onGetViewFactory(Intent intent) {
return new MessageListRemoteViewFactory(this.getApplicationContext()); return new MessageListRemoteViewFactory(getApplicationContext());
} }
} }