Invoke the cursor.close() after loading data from database.

Test: make RunSettingsRoboTests + manual
Bug: 258099535
Change-Id: Ie8d8f5294fff6e44b7151e22f9ae7b5b53cd5d6d
This commit is contained in:
Kuan Wang
2022-11-28 16:37:53 +08:00
parent a6a7e029d7
commit 5285597dee

View File

@@ -263,6 +263,11 @@ public final class DatabaseUtils {
}
batteryHistEntryMap.put(key, entry);
}
try {
cursor.close();
} catch (Exception e) {
Log.e(TAG, "cursor.close() failed", e);
}
}
return resultMap;
}