Merge "Merge "SQLiteCursor must be closed before throwing exception" into rvc-dev am: 2d3f5ecd4a am: 826e63f47a" into rvc-d1-dev-plus-aosp am: 8fea5708f5

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/11983925

Change-Id: I524d4fea38b1a89be15128dc6c30e189e7701cce
This commit is contained in:
Automerger Merge Worker
2020-06-24 13:14:13 +00:00

View File

@@ -127,10 +127,12 @@ public class SlicesDatabaseAccessor {
int numResults = resultCursor.getCount();
if (numResults == 0) {
resultCursor.close();
throw new IllegalStateException("Invalid Slices key from path: " + path);
}
if (numResults > 1) {
resultCursor.close();
throw new IllegalStateException(
"Should not match more than 1 slice with path: " + path);
}