UpdateService: add missing cursor.close()
Found by Android Studio.
This commit is contained in:
parent
50b2e6f7a5
commit
145314a83a
@ -489,6 +489,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
AppProvider.DataColumns.PACKAGE_NAME,
|
AppProvider.DataColumns.PACKAGE_NAME,
|
||||||
AppProvider.DataColumns.SUGGESTED_VERSION_CODE,
|
AppProvider.DataColumns.SUGGESTED_VERSION_CODE,
|
||||||
}, null, null, null);
|
}, null, null, null);
|
||||||
|
if (cursor != null) {
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
for (int i = 0; i < cursor.getCount(); i++) {
|
for (int i = 0; i < cursor.getCount(); i++) {
|
||||||
App app = new App(cursor);
|
App app = new App(cursor);
|
||||||
@ -499,6 +500,8 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
DownloaderService.queue(this, app.packageName, urlString);
|
DownloaderService.queue(this, app.packageName, urlString);
|
||||||
cursor.moveToNext();
|
cursor.moveToNext();
|
||||||
}
|
}
|
||||||
|
cursor.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showAppUpdatesNotification(Cursor hasUpdates) {
|
private void showAppUpdatesNotification(Cursor hasUpdates) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user