commit | 662ba59a47a1537bb08f3752cd4cbf8b99f4a45a | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Thu Jun 01 22:10:34 2023 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Jun 01 22:10:34 2023 +0000 |
tree | e086e2357d4145306917569154fc5c0dca6090fe | |
parent | b2b16851efce292b106e72a2b72b9810b4864772 [diff] | |
parent | 38f1b45d5017a5a05d6c0466219c54cd8af43f07 [diff] |
Merge "Fix resource leakage caused by cursor"
diff --git a/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java b/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java index e0c016f..bb8174e 100644 --- a/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java +++ b/src/com/android/settings/inputmethod/UserDictionaryCursorLoader.java
@@ -94,6 +94,8 @@ 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; } }