diff options
author | Fred Quintana <> | 2009-03-24 20:10:17 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 20:10:17 -0700 |
commit | 22f711423e66750cd44a64e75372ea66304fb9a1 (patch) | |
tree | 06653acb4a7d79d8d2b38bdf0997c893c18d726f /packages/SubscribedFeedsProvider/src | |
parent | ef0996ffa36cfe9b7927e09aece801fb4f594ced (diff) | |
download | frameworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.zip frameworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.tar.gz frameworks_base-22f711423e66750cd44a64e75372ea66304fb9a1.tar.bz2 |
Automated import from //branches/master/...@141380,141380
Diffstat (limited to 'packages/SubscribedFeedsProvider/src')
-rw-r--r-- | packages/SubscribedFeedsProvider/src/com/android/providers/subscribedfeeds/SubscribedFeedsIntentService.java | 15 |
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. |