From f3cb1d5bd4501719b093868d617f76dc4337662f Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 9 Jun 2016 12:19:42 +1000 Subject: [PATCH] Ask for all fields from the content provider. It is not a particularly expensive operation in the scheme of things. When we are going to the database, the bottlneck is in disk access for the actual query of the database tables. The difference between retrieving two columns or all the columns when the query is for a handful of apps is inconsequential. Thus, it is better to be safe than sorry and just ask for all the things so that our value objects are correctly populated. --- app/src/main/java/org/fdroid/fdroid/UpdateService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/fdroid/fdroid/UpdateService.java b/app/src/main/java/org/fdroid/fdroid/UpdateService.java index be0565afa..404c151ac 100644 --- a/app/src/main/java/org/fdroid/fdroid/UpdateService.java +++ b/app/src/main/java/org/fdroid/fdroid/UpdateService.java @@ -467,10 +467,8 @@ public class UpdateService extends IntentService { private void autoDownloadUpdates() { Cursor cursor = getContentResolver().query( AppProvider.getCanUpdateUri(), - new String[]{ - AppProvider.DataColumns.PACKAGE_NAME, - AppProvider.DataColumns.SUGGESTED_VERSION_CODE, - }, null, null, null); + AppProvider.DataColumns.ALL, + null, null, null); if (cursor != null) { cursor.moveToFirst(); for (int i = 0; i < cursor.getCount(); i++) {