diff options
| author | Vasu Nori <vnori@google.com> | 2010-08-04 11:57:51 -0700 |
|---|---|---|
| committer | Vasu Nori <vnori@google.com> | 2010-08-04 12:54:48 -0700 |
| commit | a7dd5eab33d1a87135ae5bd40a02f2e3c564f5de (patch) | |
| tree | 3c43e5b7696ded95b192639defd53f7ac5ec29f9 /core/java/android/content/ContentQueryMap.java | |
| parent | f71925c84f9e4504d474758f150d9a65098e0a23 (diff) | |
requery() return value should be checked
if not checked and if the cursor continues to be used, it will result in
bug:2529736
Change-Id: I920f665643561374c2211acded6cc31fa8931909
Diffstat (limited to 'core/java/android/content/ContentQueryMap.java')
| -rw-r--r-- | core/java/android/content/ContentQueryMap.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/content/ContentQueryMap.java b/core/java/android/content/ContentQueryMap.java index dbcb4a7078a4..c955094cd33d 100644 --- a/core/java/android/content/ContentQueryMap.java +++ b/core/java/android/content/ContentQueryMap.java @@ -129,7 +129,9 @@ public class ContentQueryMap extends Observable { /** Requeries the cursor and reads the contents into the cache */ public void requery() { mDirty = false; - mCursor.requery(); + if (!mCursor.requery()) { + throw new IllegalStateException("trying to requery an already closed cursor"); + } readCursorIntoCache(); setChanged(); notifyObservers(); |
