Merge branch 'master' of github.com:open-keychain/open-keychain

This commit is contained in:
Dominik Schürmann
2015-07-02 17:39:58 +02:00
13 changed files with 56 additions and 19 deletions

View File

@@ -138,6 +138,9 @@ public class Preferences {
public String[] getKeyServers() {
String rawData = mSharedPreferences.getString(Constants.Pref.KEY_SERVERS,
Constants.Defaults.KEY_SERVERS);
if (rawData.equals("")) {
return new String[0];
}
Vector<String> servers = new Vector<>();
String chunks[] = rawData.split(",");
for (String c : chunks) {
@@ -150,7 +153,8 @@ public class Preferences {
}
public String getPreferredKeyserver() {
return getKeyServers()[0];
String[] keyservers = getKeyServers();
return keyservers.length == 0 ? null : keyservers[0];
}
public void setKeyServers(String[] value) {