diff --git a/app/src/main/java/org/fdroid/fdroid/localrepo/CacheSwapAppsService.java b/app/src/main/java/org/fdroid/fdroid/localrepo/CacheSwapAppsService.java index 63a1fa1c0..31d3c880c 100644 --- a/app/src/main/java/org/fdroid/fdroid/localrepo/CacheSwapAppsService.java +++ b/app/src/main/java/org/fdroid/fdroid/localrepo/CacheSwapAppsService.java @@ -37,7 +37,9 @@ public class CacheSwapAppsService extends IntentService { * Parse the locally installed APK for {@code packageName} and save its XML * to the APK XML cache. */ - public static void parseApp(Context context, Intent intent) { + private static void parseApp(Context context, String packageName) { + Intent intent = new Intent(); + intent.setData(Utils.getPackageUri(packageName)); intent.setClass(context, CacheSwapAppsService.class); intent.setAction(ACTION_PARSE_APP); context.startService(intent); @@ -57,9 +59,7 @@ public class CacheSwapAppsService extends IntentService { } if (!indexJarFile.exists() || FileUtils.isFileNewer(new File(applicationInfo.sourceDir), indexJarFile)) { - Intent intent = new Intent(); - intent.setData(Utils.getPackageUri(applicationInfo.packageName)); - parseApp(context, intent); + parseApp(context, applicationInfo.packageName); } } }