Return app name correctly from getAppName().

Due to the earlier refactoring of `getNotificationTitle()` (or something like that)
to `getAppName()`, it was still returning `getString(downloading_apk, appName)` instead
of just the app name.
This commit is contained in:
Peter Serwylo 2016-05-12 12:25:25 +10:00
parent 7389315dfa
commit 63807a688d

View File

@ -245,13 +245,13 @@ public class InstallManagerService extends Service {
App app = ACTIVE_APPS.get(apk.packageName); App app = ACTIVE_APPS.get(apk.packageName);
if (app == null || TextUtils.isEmpty(app.name)) { if (app == null || TextUtils.isEmpty(app.name)) {
if (TEMP_HACK_APP_NAMES.containsKey(urlString)) { if (TEMP_HACK_APP_NAMES.containsKey(urlString)) {
return getString(R.string.downloading_apk, TEMP_HACK_APP_NAMES.get(urlString)); return TEMP_HACK_APP_NAMES.get(urlString);
} else { } else {
// this is ugly, but its better than nothing as a failsafe // this is ugly, but its better than nothing as a failsafe
return getString(R.string.downloading_apk, urlString); return urlString;
} }
} else { } else {
return getString(R.string.downloading_apk, app.name); return app.name;
} }
} }