diff options
author | Tim Bray <timbray@gmail.com> | 2014-06-05 11:56:38 -0700 |
---|---|---|
committer | Tim Bray <timbray@gmail.com> | 2014-06-05 11:58:18 -0700 |
commit | 5466adee410280af390023b163ee512d98be0601 (patch) | |
tree | 8e9270521d2427665ab2a608ece9cae62ba4806c /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java | |
parent | fc3a6920028e3dd4f31be0681145d2a3a4700bd2 (diff) | |
download | open-keychain-5466adee410280af390023b163ee512d98be0601.tar.gz open-keychain-5466adee410280af390023b163ee512d98be0601.tar.bz2 open-keychain-5466adee410280af390023b163ee512d98be0601.zip |
Clean up keyimport.ImportKeysListEntry
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java index 041fc8040..233b1fca8 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/ImportKeysAdapter.java @@ -33,7 +33,6 @@ import android.widget.TextView; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.keyimport.ImportKeysListEntry; import org.sufficientlysecure.keychain.pgp.KeyRing; -import org.sufficientlysecure.keychain.pgp.PgpKeyHelper; import org.sufficientlysecure.keychain.util.Highlighter; import java.util.ArrayList; @@ -120,13 +119,13 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { } // main user id - String userId = entry.userIds.get(0); + String userId = entry.getUserIds().get(0); String[] userIdSplit = KeyRing.splitUserId(userId); // name if (userIdSplit[0] != null) { // show red user id if it is a secret key - if (entry.secretKey) { + if (entry.isSecretKey()) { holder.mainUserId.setText(mActivity.getString(R.string.secret_key) + " " + userIdSplit[0]); holder.mainUserId.setTextColor(Color.RED); @@ -147,26 +146,26 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { holder.mainUserIdRest.setVisibility(View.GONE); } - holder.keyId.setText(entry.keyIdHex); + holder.keyId.setText(entry.getKeyIdHex()); // don't show full fingerprint on key import holder.fingerprint.setVisibility(View.GONE); - if (entry.bitStrength != 0 && entry.algorithm != null) { - holder.algorithm.setText("" + entry.bitStrength + "/" + entry.algorithm); + if (entry.getBitStrength() != 0 && entry.getAlgorithm() != null) { + holder.algorithm.setText("" + entry.getBitStrength() + "/" + entry.getAlgorithm()); holder.algorithm.setVisibility(View.VISIBLE); } else { holder.algorithm.setVisibility(View.INVISIBLE); } - if (entry.revoked) { + if (entry.isRevoked()) { holder.status.setVisibility(View.VISIBLE); holder.status.setText(R.string.revoked); } else { holder.status.setVisibility(View.GONE); } - if (entry.userIds.size() == 1) { + if (entry.getUserIds().size() == 1) { holder.userIdsList.setVisibility(View.GONE); } else { holder.userIdsList.setVisibility(View.VISIBLE); @@ -174,7 +173,7 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> { // clear view from holder holder.userIdsList.removeAllViews(); - Iterator<String> it = entry.userIds.iterator(); + Iterator<String> it = entry.getUserIds().iterator(); // skip primary user id it.next(); while (it.hasNext()) { |