mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-02-15 01:23:56 -05:00
purge appInfo property variable from App class
Expose less stuff as properties, this didn't need to be exposed, it was only an implementation shortcut.
This commit is contained in:
@@ -95,7 +95,6 @@ public class App extends ValueObject implements Comparable<App> {
|
||||
|
||||
public int installedVersionCode;
|
||||
|
||||
public ApplicationInfo appInfo;
|
||||
public Apk installedApk; // might be null if not installed
|
||||
|
||||
@Override
|
||||
@@ -215,7 +214,6 @@ public class App extends ValueObject implements Comparable<App> {
|
||||
+ ", last updated on " + this.lastUpdated + ")</p>";
|
||||
|
||||
this.name = (String) appInfo.loadLabel(pm);
|
||||
this.appInfo = appInfo;
|
||||
|
||||
File apkFile = new File(appInfo.publicSourceDir);
|
||||
Apk apk = new Apk();
|
||||
|
||||
@@ -210,9 +210,17 @@ public class LocalRepoManager {
|
||||
}
|
||||
|
||||
public void copyIconsToRepo() {
|
||||
for (App app : apps.values())
|
||||
if (app.installedApk != null)
|
||||
copyIconToRepo(app.appInfo.loadIcon(pm), app.id, app.installedApk.vercode);
|
||||
ApplicationInfo appInfo;
|
||||
for (App app : apps.values()) {
|
||||
if (app.installedApk != null) {
|
||||
try {
|
||||
appInfo = pm.getApplicationInfo(app.id, PackageManager.GET_META_DATA);
|
||||
copyIconToRepo(appInfo.loadIcon(pm), app.id, app.installedApk.vercode);
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user