\r
final int fontWorkAround = prefs.getInt(C.FONT_WORKAROUND, 1);\r
if (fontWorkAround == 0) {\r
+ Log.w(LOG, "Loading font seemed to fail last time, trying with default font.");\r
Toast.makeText(this, getString(R.string.fontWorkaround), Toast.LENGTH_LONG).show();\r
prefs.edit().putString(getString(R.string.fontKey), "SYSTEM").commit();\r
}\r
} catch (NumberFormatException e) {\r
fontSizeSp = 14;\r
} \r
- // Things worked with loading the font.\r
- prefs.edit().putInt(C.FONT_WORKAROUND, 1).commit();\r
\r
\r
setContentView(R.layout.dictionary_activity);\r
@Override\r
protected void onPause() {\r
super.onPause();\r
+ \r
+ // If the app exits normally, this will happen.\r
+ final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\r
+ Log.d(LOG, "Loading font seemed to work.");\r
+ prefs.edit().putInt(C.FONT_WORKAROUND, 1).commit();\r
}\r
\r
private static void setDictionaryPrefs(final Context context,\r