Change resource name and remove unneeded if from 44232af

This commit is contained in:
mar-v-in 2014-02-27 10:55:52 +01:00
parent 44232afe94
commit b0ca33da40
2 changed files with 11 additions and 13 deletions

View File

@ -2,6 +2,6 @@
<resources>
<string name="openpgp_list_preference_none">None</string>
<string name="install_via">Install OpenKeychain via %s</string>
<string name="openpgp_install_openkeychain_via">Install OpenKeychain via %s</string>
</resources>

View File

@ -94,7 +94,6 @@ public class OpenPgpListPreference extends DialogPreference {
if (mProviderList.isEmpty()) {
resInfo = getContext().getPackageManager().queryIntentActivities
(MARKET_INTENT, 0);
if (!resInfo.isEmpty()) {
for (ResolveInfo resolveInfo : resInfo) {
Intent marketIntent = new Intent(MARKET_INTENT);
intent.setPackage(resolveInfo.activityInfo.packageName);
@ -102,12 +101,11 @@ public class OpenPgpListPreference extends DialogPreference {
String marketName = String.valueOf(resolveInfo.activityInfo.applicationInfo
.loadLabel(getContext().getPackageManager()));
String simpleName = String.format(getContext().getString(R.string
.install_via), marketName);
.openpgp_install_openkeychain_via), marketName);
mProviderList.add(new OpenPgpProviderEntry(OPENKEYCHAIN_PACKAGE, simpleName,
icon, marketIntent));
}
}
}
// add "none"-entry
mProviderList.add(0, new OpenPgpProviderEntry("",