Merge branch 'stable-v0.100' into 'stable-v0.100'

two bug fixes for 0.100.1

two bug fixes for 0.100.1

See merge request 
This commit is contained in:
Hans-Christoph Steiner 2016-06-14 12:23:57 +00:00
commit f2696f3ec2
2 changed files with 6 additions and 3 deletions
app/src/main/java/org/fdroid/fdroid

@ -272,8 +272,10 @@ public class App extends ValueObject implements Comparable<App> {
final CharSequence appDescription = appInfo.loadDescription(pm);
if (TextUtils.isEmpty(appDescription)) {
this.summary = "(installed by " + installerPackageLabel + ")";
} else {
} else if (appDescription.length() > 40) {
this.summary = (String) appDescription.subSequence(0, 40);
} else {
this.summary = (String) appDescription;
}
this.packageName = appInfo.packageName;
this.added = new Date(packageInfo.firstInstallTime);

@ -363,9 +363,10 @@ public class InstallManagerService extends Service {
*/
private static Apk removeFromActive(String urlString) {
Apk apk = ACTIVE_APKS.remove(urlString);
if (apk != null) {
ACTIVE_APPS.remove(apk.packageName);
if (apk == null) {
return new Apk();
}
ACTIVE_APPS.remove(apk.packageName);
return apk;
}