small code restructures

This commit is contained in:
Dominik Schürmann 2014-01-29 01:38:34 +01:00
parent 2b0a7f2bf8
commit 312b7fde53
3 changed files with 7 additions and 7 deletions

View File

@ -91,28 +91,28 @@ public class ImportKeysAdapter extends ArrayAdapter<ImportKeysListEntry> {
TextView status = (TextView) view.findViewById(R.id.status); TextView status = (TextView) view.findViewById(R.id.status);
status.setText(""); status.setText("");
// main user id
String userId = entry.userIds.get(0); String userId = entry.userIds.get(0);
if (userId != null) { if (userId != null) {
String[] userIdSplit = PgpKeyHelper.splitUserId(userId); String[] userIdSplit = PgpKeyHelper.splitUserId(userId);
// name
if (userIdSplit[0] != null && userIdSplit[0].length() > 0) { if (userIdSplit[0] != null && userIdSplit[0].length() > 0) {
// show red user id if it is a secret key // show red user id if it is a secret key
if (entry.secretKey) { if (entry.secretKey) {
userId = mActivity.getString(R.string.secret_key) + " " + userIdSplit[0]; userIdSplit[0] = mActivity.getString(R.string.secret_key) + " " + userIdSplit[0];
mainUserId.setTextColor(Color.RED); mainUserId.setTextColor(Color.RED);
mainUserId.setText(userId);
} else {
mainUserId.setText(userIdSplit[0]);
} }
mainUserId.setText(userIdSplit[0]);
} }
// email
if (userIdSplit[1] != null && userIdSplit[1].length() > 0) { if (userIdSplit[1] != null && userIdSplit[1].length() > 0) {
mainUserIdRest.setText(userIdSplit[1]); mainUserIdRest.setText(userIdSplit[1]);
mainUserIdRest.setVisibility(View.VISIBLE); mainUserIdRest.setVisibility(View.VISIBLE);
} else { } else {
mainUserIdRest.setVisibility(View.GONE); mainUserIdRest.setVisibility(View.GONE);
} }
} }
keyId.setText(entry.hexKeyId); keyId.setText(entry.hexKeyId);

View File

@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-18 target=android-19
android.library=true android.library=true

View File

@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-7 target=android-17
android.library=true android.library=true