Code review suggested changes.

This commit is contained in:
krtkush 2018-10-22 23:12:25 +05:30
parent 8ef702fa07
commit 96dac0f979
1 changed files with 2 additions and 7 deletions

View File

@ -194,17 +194,12 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
Signature[] signatures = packageInfo.signatures; Signature[] signatures = packageInfo.signatures;
byte[] cert = signatures[0].toByteArray(); byte[] cert = signatures[0].toByteArray();
InputStream input = new ByteArrayInputStream(cert); InputStream input = new ByteArrayInputStream(cert);
CertificateFactory cf = null; CertificateFactory cf = null;
try {
cf = CertificateFactory.getInstance("X509");
} catch (CertificateException e) {
e.printStackTrace();
}
X509Certificate c = null; X509Certificate c = null;
try { try {
cf = CertificateFactory.getInstance("X509");
c = (X509Certificate) cf.generateCertificate(input); c = (X509Certificate) cf.generateCertificate(input);
} catch (CertificateException e) { } catch (CertificateException e) {
e.printStackTrace(); e.printStackTrace();