Skip to content

Commit

Permalink
Fixes PMD issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 committed Mar 3, 2018
1 parent 2baa3f6 commit 3586f9d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ public void onClick(View v) {
File j = new File(Collect.ODK_ROOT + "/collect.settings.json");
// Give JSON file preference
if (j.exists()) {
SharedPreferencesUtils sharedPrefs = new SharedPreferencesUtils();
boolean success = SharedPreferencesUtils.loadSharedPreferencesFromJSONFile(j);
if (success) {
ToastUtils.showLongToast(R.string.settings_successfully_loaded_file_notification);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public interface ActionListener {
/**
* The operation succeeded
*/
public void onSuccess();
void onSuccess();

/**
* The operation failed
*
* @param exception which caused the failure
*/
public void onFailure(Exception exception);
void onFailure(Exception exception);
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@

package org.odk.collect.android.utilities;

import android.content.Context;

import org.json.JSONException;
import org.json.JSONObject;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.listeners.ActionListener;
import org.odk.collect.android.preferences.AdminSharedPreferences;
import org.odk.collect.android.preferences.AutoSendPreferenceMigrator;
Expand All @@ -42,8 +39,6 @@

public class SharedPreferencesUtils {

private final Context context = Collect.getInstance();

public static String getJSONFromPreferences(Collection<String> passwordKeys) throws JSONException {
Collection<String> keys = new ArrayList<>(passwordKeys);
keys.addAll(GENERAL_KEYS.keySet());
Expand Down

0 comments on commit 3586f9d

Please sign in to comment.