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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/label_signature"
|
android:id="@+id/label_repo_fingerprint"
|
||||||
android:text="@string/repo_signature"
|
android:text="@string/repo_fingerprint"
|
||||||
android:layout_below="@id/text_last_update"
|
android:layout_below="@id/text_last_update"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:paddingTop="@dimen/form_label_top" />
|
android:paddingTop="@dimen/form_label_top" />
|
||||||
@ -100,15 +100,15 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:scrollHorizontally="false"
|
android:scrollHorizontally="false"
|
||||||
android:id="@+id/text_signature"
|
android:id="@+id/text_repo_fingerprint"
|
||||||
android:layout_below="@id/label_signature" android:textStyle="bold"/>
|
android:layout_below="@id/label_repo_fingerprint" android:textStyle="bold"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:scrollHorizontally="false"
|
android:scrollHorizontally="false"
|
||||||
android:id="@+id/text_signature_description"
|
android:id="@+id/text_repo_fingerprint_description"
|
||||||
android:layout_below="@id/text_signature"/>
|
android:layout_below="@id/text_repo_fingerprint"/>
|
||||||
|
|
||||||
<!-- The last time this repo was updated -->
|
<!-- The last time this repo was updated -->
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
<string name="unsigned">Unsigned</string>
|
<string name="unsigned">Unsigned</string>
|
||||||
<string name="repo_url">URL</string>
|
<string name="repo_url">URL</string>
|
||||||
<string name="repo_num_apps">Number of apps</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_description">Description</string>
|
||||||
<string name="repo_last_update">Last update</string>
|
<string name="repo_last_update">Last update</string>
|
||||||
<string name="repo_update">Update</string>
|
<string name="repo_update">Update</string>
|
||||||
|
@ -32,9 +32,9 @@ public class RepoDetailsFragment extends Fragment {
|
|||||||
R.id.text_num_apps,
|
R.id.text_num_apps,
|
||||||
R.id.label_last_update,
|
R.id.label_last_update,
|
||||||
R.id.text_last_update,
|
R.id.text_last_update,
|
||||||
R.id.label_signature,
|
R.id.label_repo_fingerprint,
|
||||||
R.id.text_signature,
|
R.id.text_repo_fingerprint,
|
||||||
R.id.text_signature_description
|
R.id.text_repo_fingerprint_description
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -177,7 +177,7 @@ public class RepoDetailsFragment extends Fragment {
|
|||||||
numApps.setText(Integer.toString(repo.getNumberOfApps()));
|
numApps.setText(Integer.toString(repo.getNumberOfApps()));
|
||||||
|
|
||||||
setupDescription(repoView, repo);
|
setupDescription(repoView, repo);
|
||||||
setupSignature(repoView, repo);
|
setupRepoFingerprint(repoView, repo);
|
||||||
|
|
||||||
// Repos that existed before this feature was supported will have an
|
// Repos that existed before this feature was supported will have an
|
||||||
// "Unknown" last update until next time they update...
|
// "Unknown" last update until next time they update...
|
||||||
@ -310,26 +310,26 @@ public class RepoDetailsFragment extends Fragment {
|
|||||||
).show();
|
).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupSignature(ViewGroup parent, DB.Repo repo) {
|
private void setupRepoFingerprint(ViewGroup parent, DB.Repo repo) {
|
||||||
TextView signatureView = (TextView)parent.findViewById(R.id.text_signature);
|
TextView repoFingerprintView = (TextView)parent.findViewById(R.id.text_repo_fingerprint);
|
||||||
TextView signatureDescView = (TextView)parent.findViewById(R.id.text_signature_description);
|
TextView repoFingerprintDescView = (TextView)parent.findViewById(R.id.text_repo_fingerprint_description);
|
||||||
|
|
||||||
String signature;
|
String repoFingerprint;
|
||||||
int signatureColour;
|
int repoFingerprintColor;
|
||||||
|
|
||||||
if (repo.pubkey != null && repo.pubkey.length() > 0) {
|
if (repo.pubkey != null && repo.pubkey.length() > 0) {
|
||||||
signature = Utils.formatFingerprint(repo.pubkey);
|
repoFingerprint = Utils.formatFingerprint(repo.pubkey);
|
||||||
signatureColour = getResources().getColor(R.color.signed);
|
repoFingerprintColor = getResources().getColor(R.color.signed);
|
||||||
signatureDescView.setVisibility(View.GONE);
|
repoFingerprintDescView.setVisibility(View.GONE);
|
||||||
} else {
|
} else {
|
||||||
signature = getResources().getString(R.string.unsigned);
|
repoFingerprint = getResources().getString(R.string.unsigned);
|
||||||
signatureColour = getResources().getColor(R.color.unsigned);
|
repoFingerprintColor = getResources().getColor(R.color.unsigned);
|
||||||
signatureDescView.setVisibility(View.VISIBLE);
|
repoFingerprintDescView.setVisibility(View.VISIBLE);
|
||||||
signatureDescView.setText(getResources().getString(R.string.unsigned_description));
|
repoFingerprintDescView.setText(getResources().getString(R.string.unsigned_description));
|
||||||
}
|
}
|
||||||
|
|
||||||
signatureView.setText(signature);
|
repoFingerprintView.setText(repoFingerprint);
|
||||||
signatureView.setTextColor(signatureColour);
|
repoFingerprintView.setTextColor(repoFingerprintColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user