From 47659b5cecea6ae30794d0348976f1ab5cd0ad9f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 21 Jan 2014 18:30:02 -0500 Subject: [PATCH] relabel misnamed items from "signature" to "repo fingerprint" In the new Repo Details screen, there is some elements that are labels as the "signature". This is not quite right, it is actually referring to the fingerprint of the repo signing key. Since a repo will also usually have a HTTPS certificate fingerprint, there will also be a fingerprint for that certificate. --- res/layout/repodetails.xml | 12 +++---- res/values/strings.xml | 2 +- .../views/fragments/RepoDetailsFragment.java | 36 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/res/layout/repodetails.xml b/res/layout/repodetails.xml index ad06cdc07..f7702e100 100644 --- a/res/layout/repodetails.xml +++ b/res/layout/repodetails.xml @@ -90,8 +90,8 @@ @@ -100,15 +100,15 @@ android:layout_height="wrap_content" android:singleLine="false" android:scrollHorizontally="false" - android:id="@+id/text_signature" - android:layout_below="@id/label_signature" android:textStyle="bold"/> + android:id="@+id/text_repo_fingerprint" + android:layout_below="@id/label_repo_fingerprint" android:textStyle="bold"/> + android:id="@+id/text_repo_fingerprint_description" + android:layout_below="@id/text_repo_fingerprint"/> Unsigned URL Number of apps - Signature + Fingerprint of Repo Signing Key (SHA1) Description Last update Update diff --git a/src/org/fdroid/fdroid/views/fragments/RepoDetailsFragment.java b/src/org/fdroid/fdroid/views/fragments/RepoDetailsFragment.java index 84c3d347b..367aacb5a 100644 --- a/src/org/fdroid/fdroid/views/fragments/RepoDetailsFragment.java +++ b/src/org/fdroid/fdroid/views/fragments/RepoDetailsFragment.java @@ -32,9 +32,9 @@ public class RepoDetailsFragment extends Fragment { R.id.text_num_apps, R.id.label_last_update, R.id.text_last_update, - R.id.label_signature, - R.id.text_signature, - R.id.text_signature_description + R.id.label_repo_fingerprint, + R.id.text_repo_fingerprint, + R.id.text_repo_fingerprint_description }; /** @@ -177,7 +177,7 @@ public class RepoDetailsFragment extends Fragment { numApps.setText(Integer.toString(repo.getNumberOfApps())); setupDescription(repoView, repo); - setupSignature(repoView, repo); + setupRepoFingerprint(repoView, repo); // Repos that existed before this feature was supported will have an // "Unknown" last update until next time they update... @@ -310,26 +310,26 @@ public class RepoDetailsFragment extends Fragment { ).show(); } - private void setupSignature(ViewGroup parent, DB.Repo repo) { - TextView signatureView = (TextView)parent.findViewById(R.id.text_signature); - TextView signatureDescView = (TextView)parent.findViewById(R.id.text_signature_description); + private void setupRepoFingerprint(ViewGroup parent, DB.Repo repo) { + TextView repoFingerprintView = (TextView)parent.findViewById(R.id.text_repo_fingerprint); + TextView repoFingerprintDescView = (TextView)parent.findViewById(R.id.text_repo_fingerprint_description); - String signature; - int signatureColour; + String repoFingerprint; + int repoFingerprintColor; if (repo.pubkey != null && repo.pubkey.length() > 0) { - signature = Utils.formatFingerprint(repo.pubkey); - signatureColour = getResources().getColor(R.color.signed); - signatureDescView.setVisibility(View.GONE); + repoFingerprint = Utils.formatFingerprint(repo.pubkey); + repoFingerprintColor = getResources().getColor(R.color.signed); + repoFingerprintDescView.setVisibility(View.GONE); } else { - signature = getResources().getString(R.string.unsigned); - signatureColour = getResources().getColor(R.color.unsigned); - signatureDescView.setVisibility(View.VISIBLE); - signatureDescView.setText(getResources().getString(R.string.unsigned_description)); + repoFingerprint = getResources().getString(R.string.unsigned); + repoFingerprintColor = getResources().getColor(R.color.unsigned); + repoFingerprintDescView.setVisibility(View.VISIBLE); + repoFingerprintDescView.setText(getResources().getString(R.string.unsigned_description)); } - signatureView.setText(signature); - signatureView.setTextColor(signatureColour); + repoFingerprintView.setText(repoFingerprint); + repoFingerprintView.setTextColor(repoFingerprintColor); } public void onCreate(Bundle savedInstanceState) {