summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFred Quintana <>2009-03-24 20:10:17 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-24 20:10:17 -0700
commit22f711423e66750cd44a64e75372ea66304fb9a1 (patch)
tree06653acb4a7d79d8d2b38bdf0997c893c18d726f /packages
parentef0996ffa36cfe9b7927e09aece801fb4f594ced (diff)
downloadframeworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.zip
frameworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.tar.gz
frameworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.tar.bz2
Automated import from //branches/master/...@141380,141380
Diffstat (limited to 'packages')
-rw-r--r--packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
index df599c7..8268fee 100644
--- a/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
+++ b/packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java
@@ -155,14 +155,17 @@ public class SubscribedFeedsIntentService extends IntentService {
ContentResolver contentResolver = context.getContentResolver();
Cursor c = contentResolver.query(SubscribedFeeds.Accounts.CONTENT_URI,
sAccountProjection, null, null, null);
- while (c.moveToNext()) {
- String account = c.getString(0);
- if (TextUtils.isEmpty(account)) {
- continue;
+ try {
+ while (c.moveToNext()) {
+ String account = c.getString(0);
+ if (TextUtils.isEmpty(account)) {
+ continue;
+ }
+ accounts.add(account);
}
- accounts.add(account);
+ } finally {
+ c.close();
}
- c.deactivate();
// Clear the auth tokens for all these accounts so that we are sure
// they will still be valid until the next time we refresh them.