commit | 38f1b45d5017a5a05d6c0466219c54cd8af43f07 | [log] [tgz] |
---|---|---|
author | Cao Peng <cao.peng2@zte.com.cn> | Thu Jun 01 18:16:26 2023 +0800 |
committer | Jia Jia <jia.jia@zte.com.cn> | Thu Jun 01 18:16:26 2023 +0800 |
tree | e086e2357d4145306917569154fc5c0dca6090fe | |
parent | b2b16851efce292b106e72a2b72b9810b4864772 [diff] |
Fix resource leakage caused by cursor Change-Id: I9507658cc82a2b9760507530920a37044f7de2fd Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
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; } }