am a657afc3: am d555a0d7: Merge "Cleanup"

* commit 'a657afc32e099d1b12516788e1a32d1303ced295':
  Cleanup
main
Jean Chalard 2013-04-03 19:27:11 -07:00 committed by Android Git Automerger
commit 1c63efc975
1 changed files with 5 additions and 0 deletions

View File

@ -130,6 +130,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment
} }
} }
@Override
public void downloadedMetadata(final boolean succeeded) { public void downloadedMetadata(final boolean succeeded) {
stopLoadingAnimation(); stopLoadingAnimation();
if (!succeeded) return; // If the download failed nothing changed, so no need to refresh if (!succeeded) return; // If the download failed nothing changed, so no need to refresh
@ -141,6 +142,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment
}.start(); }.start();
} }
@Override
public void wordListDownloadFinished(final String wordListId, final boolean succeeded) { public void wordListDownloadFinished(final String wordListId, final boolean succeeded) {
final WordListPreference pref = findWordListPreference(wordListId); final WordListPreference pref = findWordListPreference(wordListId);
if (null == pref) return; if (null == pref) return;
@ -177,6 +179,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment
return null; return null;
} }
@Override
public void updateCycleCompleted() {} public void updateCycleCompleted() {}
private void refreshNetworkState() { private void refreshNetworkState() {
@ -260,6 +263,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment
} else if (!cursor.moveToFirst()) { } else if (!cursor.moveToFirst()) {
final ArrayList<Preference> result = new ArrayList<Preference>(); final ArrayList<Preference> result = new ArrayList<Preference>();
result.add(createErrorMessage(activity, R.string.no_dictionaries_available)); result.add(createErrorMessage(activity, R.string.no_dictionaries_available));
cursor.close();
return result; return result;
} else { } else {
final String systemLocaleString = Locale.getDefault().toString(); final String systemLocaleString = Locale.getDefault().toString();
@ -289,6 +293,7 @@ public final class DictionarySettingsFragment extends PreferenceFragment
prefList.put(key, pref); prefList.put(key, pref);
} }
} while (cursor.moveToNext()); } while (cursor.moveToNext());
cursor.close();
return prefList.values(); return prefList.values();
} }
} }