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.
This commit is contained in:
parent
4cd73c12f0
commit
47659b5cec
@ -90,8 +90,8 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/label_signature"
|
||||
android:text="@string/repo_signature"
|
||||
android:id="@+id/label_repo_fingerprint"
|
||||
android:text="@string/repo_fingerprint"
|
||||
android:layout_below="@id/text_last_update"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:paddingTop="@dimen/form_label_top" />
|
||||
@ -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"/>
|
||||
<TextView
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="false"
|
||||
android:scrollHorizontally="false"
|
||||
android:id="@+id/text_signature_description"
|
||||
android:layout_below="@id/text_signature"/>
|
||||
android:id="@+id/text_repo_fingerprint_description"
|
||||
android:layout_below="@id/text_repo_fingerprint"/>
|
||||
|
||||
<!-- The last time this repo was updated -->
|
||||
<TextView
|
||||
|
@ -167,7 +167,7 @@
|
||||
<string name="unsigned">Unsigned</string>
|
||||
<string name="repo_url">URL</string>
|
||||
<string name="repo_num_apps">Number of apps</string>
|
||||
<string name="repo_signature">Signature</string>
|
||||
<string name="repo_fingerprint">Fingerprint of Repo Signing Key (SHA1)</string>
|
||||
<string name="repo_description">Description</string>
|
||||
<string name="repo_last_update">Last update</string>
|
||||
<string name="repo_update">Update</string>
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user