From 090278c304f1123ed52890f171005a2b9eb8a522 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 16 Oct 2011 20:33:39 +0400 Subject: [PATCH] small fix --- .../org/solovyev/android/calculator/CalculatorActivity.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java index 73037f38..0b5f3654 100644 --- a/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java +++ b/src/main/java/org/solovyev/android/calculator/CalculatorActivity.java @@ -71,7 +71,7 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh super.onCreate(savedInstanceState); setContentView(R.layout.main); - firstTimeInit(); + firstTimeInit(preferences); calculatorView = CalculatorView.instance.init(this, preferences, CalculatorModel.instance); @@ -154,10 +154,10 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh setTheme(styleId); } - private synchronized void firstTimeInit() { + private synchronized void firstTimeInit(@NotNull SharedPreferences preferences) { if (!initialized) { try { - CalculatorModel.instance.init(this, PreferenceManager.getDefaultSharedPreferences(this)); + CalculatorModel.instance.init(this, preferences); } catch (EvalError evalError) { throw new RuntimeException("Could not initialize interpreter!"); }