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> <resources>
<string name="openpgp_list_preference_none">None</string> <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> </resources>

View File

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