Fix codacy issues

This commit is contained in:
Neslihan 2017-07-23 18:44:38 +03:00
parent 19784f0e82
commit 4571482695

View file

@ -359,15 +359,15 @@ public class ContributionsActivity
Date strDate = null; Date strDate = null;
try { try {
String valid_until = "23/08/2017"; String validUntil = "23/08/2017";
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy"); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
strDate = sdf.parse(valid_until); strDate = sdf.parse(validUntil);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(
(CommonsApplication.getInstance()); CommonsApplication.getInstance());
// boolean to save users request about displaying popup // boolean to save users request about displaying popup
boolean displayFeedbackPopup = prefs.getBoolean("display_feedbak_popup", true); boolean displayFeedbackPopup = prefs.getBoolean("display_feedbak_popup", true);
@ -383,8 +383,8 @@ public class ContributionsActivity
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(getResources().getString(R.string.feedback_popup_title)); builder.setTitle(getResources().getString(R.string.feedback_popup_title));
builder.setMessage(getResources().getString(R.string.feedback_popup_description)); builder.setMessage(getResources().getString(R.string.feedback_popup_description));
builder.setPositiveButton(getResources().getString(R.string.feedback_popup_accept) builder.setPositiveButton(getResources().getString(R.string.feedback_popup_accept),
, new DialogInterface.OnClickListener() { new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
// Go to the page // Go to the page
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri