mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Cleanup"
This commit is contained in:
commit
d555a0d77a
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user