]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - src/com/hughes/android/dictionary/DictionaryManagerActivity.java
Always set and unset DICT_FILE and INDEX_SHORT_NAME together.
[Dictionary.git] / src / com / hughes / android / dictionary / DictionaryManagerActivity.java
index 5264248171c5b33def0dc102f344a71cc94d3f84..a328b982f0a05a8f0911cd6adceb62ca40869a10 100644 (file)
@@ -475,10 +475,7 @@ public class DictionaryManagerActivity extends ActionBarActivity {
 
         // Remove the active dictionary from the prefs so we won't autolaunch
         // next time.
-        final Editor editor = prefs.edit();
-        editor.remove(C.DICT_FILE);
-        editor.remove(C.INDEX_SHORT_NAME);
-        editor.commit();
+        prefs.edit().remove(C.DICT_FILE).remove(C.INDEX_SHORT_NAME).commit();
 
         application.backgroundUpdateDictionaries(dictionaryUpdater);