mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
Change resource name and remove unneeded if from 44232af
This commit is contained in:
parent
44232afe94
commit
b0ca33da40
@ -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>
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user