X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryActivity.java;h=f526cb9eebbd46b0d09cde37c042a8459b441a28;hb=b50c9fe7fc55463a8ea69a66908410e6adc4219f;hp=e1c4c707d1d0d0d380b5771cedeade170e5b2bb5;hpb=2a47817030f8abd3a52e6d7c3d82008b001b8ea5;p=Dictionary.git diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index e1c4c70..f526cb9 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -248,15 +248,8 @@ public class DictionaryActivity extends ListActivity { }).start(); - final int fontWorkAround = prefs.getInt(C.FONT_WORKAROUND, 1); - if (fontWorkAround == 0) { - Log.w(LOG, "Loading font seemed to fail last time, trying with default font."); - Toast.makeText(this, getString(R.string.fontWorkaround), Toast.LENGTH_LONG).show(); - prefs.edit().putString(getString(R.string.fontKey), "SYSTEM").commit(); - } - prefs.edit().putInt(C.FONT_WORKAROUND, 0).commit(); String fontName = prefs.getString(getString(R.string.fontKey), "FreeSerif.ttf.jpg"); - if (fontWorkAround == 0 || "SYSTEM".equals(fontName)) { + if ("SYSTEM".equals(fontName)) { typeface = Typeface.DEFAULT; } else { try { @@ -391,11 +384,6 @@ public class DictionaryActivity extends ListActivity { @Override protected void onPause() { super.onPause(); - - // If the app exits normally, this will happen. - final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); - Log.d(LOG, "Loading font seemed to work."); - prefs.edit().putInt(C.FONT_WORKAROUND, 1).commit(); } private static void setDictionaryPrefs(final Context context, @@ -403,7 +391,7 @@ public class DictionaryActivity extends ListActivity { final SharedPreferences.Editor prefs = PreferenceManager.getDefaultSharedPreferences(context).edit(); prefs.putString(C.DICT_FILE, dictFile.getPath()); prefs.putInt(C.INDEX_INDEX, indexIndex); - prefs.putString(C.SEARCH_TOKEN, searchToken); + prefs.putString(C.SEARCH_TOKEN, ""); // Don't need to save search token. prefs.commit(); }