diff --git a/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java b/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java index e0c016f1219..bb8174ef91c 100644 --- a/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java +++ b/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java @@ -94,6 +94,8 @@ public class UserDictionaryCursorLoader extends CursorLoader { hashSet.add(hash); result.addRow(new Object[]{id, word, shortcut}); } + // The cursor needs to be closed after use, otherwise it will cause resource leakage + candidate.close(); return result; } }