aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-04-09 01:11:33 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-04-09 01:11:33 +0200
commit27eb7c0f1be4c3633dc72f4dba199ce971b12aea (patch)
treec1f68a78f56fcea4fd110c6aa03239054222bc3a /OpenKeychain/src/main
parent9fb493418e8145ee8ebe0647e6e1c7aab50346ed (diff)
downloadopen-keychain-27eb7c0f1be4c3633dc72f4dba199ce971b12aea.tar.gz
open-keychain-27eb7c0f1be4c3633dc72f4dba199ce971b12aea.tar.bz2
open-keychain-27eb7c0f1be4c3633dc72f4dba199ce971b12aea.zip
Cleanup in SelectKeyCursorAdapter
Diffstat (limited to 'OpenKeychain/src/main')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java2
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java10
2 files changed, 3 insertions, 9 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
index 24fe43843..52b400481 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectPublicKeyFragment.java
@@ -244,7 +244,7 @@ public class SelectPublicKeyFragment extends ListFragmentWorkaround implements T
Vector<String> userIds = new Vector<String>();
for (int i = 0; i < getListView().getCount(); ++i) {
if (getListView().isItemChecked(i)) {
- userIds.add((String) mAdapter.getUserId(i));
+ userIds.add(mAdapter.getUserId(i));
}
}
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
index fbbb9caa4..d7f8c8e7a 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/SelectKeyCursorAdapter.java
@@ -25,6 +25,7 @@ import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ListView;
import android.widget.TextView;
+
import org.sufficientlysecure.keychain.Id;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
@@ -91,8 +92,6 @@ public class SelectKeyCursorAdapter extends HighlightQueryCursorAdapter {
@Override
public void bindView(View view, Context context, Cursor cursor) {
- boolean valid = cursor.getInt(mIndexProjectionValid) > 0;
-
TextView mainUserId = (TextView) view.findViewById(R.id.mainUserId);
TextView mainUserIdRest = (TextView) view.findViewById(R.id.mainUserIdRest);
TextView keyId = (TextView) view.findViewById(R.id.keyId);
@@ -112,13 +111,10 @@ public class SelectKeyCursorAdapter extends HighlightQueryCursorAdapter {
mainUserIdRest.setText("");
}
- // TODO: needed to key id to no?
- keyId.setText(R.string.no_key);
long masterKeyId = cursor.getLong(mIndexMasterKeyId);
keyId.setText(PgpKeyHelper.convertKeyIdToHexShort(masterKeyId));
- // TODO: needed to set unknown_status?
- status.setText(R.string.unknown_status);
+ boolean valid = cursor.getInt(mIndexProjectionValid) > 0;
if (valid) {
if (mKeyType == Id.type.public_key) {
status.setText(R.string.can_encrypt);
@@ -149,8 +145,6 @@ public class SelectKeyCursorAdapter extends HighlightQueryCursorAdapter {
selected.setVisibility(View.GONE);
}
- status.setText(status.getText() + " ");
-
view.setEnabled(valid);
mainUserId.setEnabled(valid);
mainUserIdRest.setEnabled(valid);