Pull request changes v2.

This commit is contained in:
krtkush 2018-11-18 19:18:16 +05:30
parent 23309e6fdf
commit 939cc56951

View file

@ -89,7 +89,6 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
return response.body().string(); return response.body().string();
} catch (IOException ex) { } catch (IOException ex) {
ErrorActivity.reportError(app, ex, null, null, ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"app update API fail", R.string.app_ui_crash)); "app update API fail", R.string.app_ui_crash));
@ -117,7 +116,6 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode);
} catch (JSONException ex) { } catch (JSONException ex) {
ex.printStackTrace();
ErrorActivity.reportError(app, ex, null, null, ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none", ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"could not parse app update JSON data", R.string.app_ui_crash)); "could not parse app update JSON data", R.string.app_ui_crash));
@ -172,8 +170,10 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
try { try {
packageInfo = pm.getPackageInfo(packageName, flags); packageInfo = pm.getPackageInfo(packageName, flags);
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException ex) {
e.printStackTrace(); ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Could not find package info", R.string.app_ui_crash));
} }
Signature[] signatures = packageInfo.signatures; Signature[] signatures = packageInfo.signatures;
@ -186,8 +186,10 @@ public class CheckForNewAppVersionTask extends AsyncTask<Void, Void, String> {
try { try {
cf = CertificateFactory.getInstance("X509"); cf = CertificateFactory.getInstance("X509");
c = (X509Certificate) cf.generateCertificate(input); c = (X509Certificate) cf.generateCertificate(input);
} catch (CertificateException e) { } catch (CertificateException ex) {
e.printStackTrace(); ErrorActivity.reportError(app, ex, null, null,
ErrorActivity.ErrorInfo.make(UserAction.SOMETHING_ELSE, "none",
"Certificate error", R.string.app_ui_crash));
} }
String hexString = null; String hexString = null;