From b0ca33da40d80149dd9861694a910a52a3d20eb4 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Thu, 27 Feb 2014 10:55:52 +0100 Subject: [PATCH] Change resource name and remove unneeded if from 44232af --- .../res/values/strings.xml | 2 +- .../openpgp/util/OpenPgpListPreference.java | 22 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/OpenPGP-Keychain-API/libraries/keychain-api-library/res/values/strings.xml b/OpenPGP-Keychain-API/libraries/keychain-api-library/res/values/strings.xml index 44d6145d4..0119831cc 100644 --- a/OpenPGP-Keychain-API/libraries/keychain-api-library/res/values/strings.xml +++ b/OpenPGP-Keychain-API/libraries/keychain-api-library/res/values/strings.xml @@ -2,6 +2,6 @@ None - Install OpenKeychain via %s + Install OpenKeychain via %s \ No newline at end of file diff --git a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java b/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java index 6a9d85b5f..7aea8f9fa 100644 --- a/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java +++ b/OpenPGP-Keychain-API/libraries/keychain-api-library/src/org/openintents/openpgp/util/OpenPgpListPreference.java @@ -94,18 +94,16 @@ 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); - Drawable icon = resolveInfo.activityInfo.loadIcon(getContext().getPackageManager()); - String marketName = String.valueOf(resolveInfo.activityInfo.applicationInfo - .loadLabel(getContext().getPackageManager())); - String simpleName = String.format(getContext().getString(R.string - .install_via), marketName); - mProviderList.add(new OpenPgpProviderEntry(OPENKEYCHAIN_PACKAGE, simpleName, - icon, marketIntent)); - } + for (ResolveInfo resolveInfo : resInfo) { + Intent marketIntent = new Intent(MARKET_INTENT); + intent.setPackage(resolveInfo.activityInfo.packageName); + Drawable icon = resolveInfo.activityInfo.loadIcon(getContext().getPackageManager()); + String marketName = String.valueOf(resolveInfo.activityInfo.applicationInfo + .loadLabel(getContext().getPackageManager())); + String simpleName = String.format(getContext().getString(R.string + .openpgp_install_openkeychain_via), marketName); + mProviderList.add(new OpenPgpProviderEntry(OPENKEYCHAIN_PACKAGE, simpleName, + icon, marketIntent)); } }