Fix for NPE in CalculatorApplication class

This commit is contained in:
serso 2015-02-23 10:23:45 +01:00
parent b5da6a811d
commit 25adac1dcd

View File

@ -46,6 +46,7 @@ import org.solovyev.common.msg.MessageType;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit;
@ReportsCrashes(formKey = "", @ReportsCrashes(formKey = "",
formUri = "https://serso.cloudant.com/acra-cpp/_design/acra-storage/_update/report", formUri = "https://serso.cloudant.com/acra-cpp/_design/acra-storage/_update/report",
@ -183,9 +184,14 @@ public class CalculatorApplication extends android.app.Application implements Sh
Locator.getInstance().getLogger().debug(TAG, "Application started!"); Locator.getInstance().getLogger().debug(TAG, "Application started!");
Locator.getInstance().getNotifier().showDebugMessage(TAG, "Application started!"); Locator.getInstance().getNotifier().showDebugMessage(TAG, "Application started!");
App.getUiThreadExecutor().execute(new Runnable() {
@Override
public void run() {
// we must update the widget when app starts // we must update the widget when app starts
App.getBroadcaster().sendEditorStateChangedIntent(); App.getBroadcaster().sendEditorStateChangedIntent();
} }
}, 100, TimeUnit.MILLISECONDS);
}
private void setTheme(@Nonnull SharedPreferences preferences) { private void setTheme(@Nonnull SharedPreferences preferences) {
final Preferences.Gui.Theme theme = Preferences.Gui.getTheme(preferences); final Preferences.Gui.Theme theme = Preferences.Gui.getTheme(preferences);