Skip to content

Commit

Permalink
Revert erroneous replacements.
Browse files Browse the repository at this point in the history
  • Loading branch information
zestyping committed Jun 24, 2019
1 parent 54082ba commit fa4c43c
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
import android.net.NetworkInfo;
import android.os.AsyncTask;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.view.Window;
import android.widget.AdapterView;
Expand Down Expand Up @@ -67,6 +65,8 @@

import javax.inject.Inject;

import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar;
import timber.log.Timber;

import static org.odk.collect.android.utilities.gdrive.GoogleAccountsManager.showSettingsDialog;
Expand Down Expand Up @@ -169,15 +169,15 @@ public void onCreate(Bundle savedInstanceState) {
try {
dismissDialog(PROGRESS_DIALOG);
} catch (Exception e) {
Timber.i("MbtilesException was thrown while dismissing a dialog.");
Timber.i("Exception was thrown while dismissing a dialog.");
}
}
if (alertShowing) {
try {
dismissDialog(PROGRESS_DIALOG);
} catch (Exception e) {
// don't care...
Timber.i("MbtilesException was thrown while dismissing a dialog.");
Timber.i("Exception was thrown while dismissing a dialog.");
}
createAlertDialog(alertMsg);
}
Expand Down Expand Up @@ -501,7 +501,7 @@ public void formDownloadComplete(HashMap<String, Object> results) {
dismissDialog(PROGRESS_DIALOG);
} catch (Exception e) {
// tried to close a dialog not open. don't care.
Timber.i("MbtilesException thrown due to closing a dialog that was not open");
Timber.i("Exception thrown due to closing a dialog that was not open");
}

StringBuilder sb = new StringBuilder();
Expand Down Expand Up @@ -713,7 +713,7 @@ protected HashMap<String, Object> doInBackground(String... params) {
publishProgress(nextPage);
} catch (IOException e) {
if (!isCancelled()) {
Timber.e(e, "MbtilesException thrown while accessing the file list");
Timber.e(e, "Exception thrown while accessing the file list");
}
}
} while (request.getPageToken() != null && request.getPageToken().length() > 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -605,14 +605,14 @@ private boolean loadSharedPreferencesFromFile(File src) {
Collect.getInstance().initProperties();
res = true;
} catch (IOException | ClassNotFoundException e) {
Timber.e(e, "MbtilesException while loading preferences from file due to : %s ", e.getMessage());
Timber.e(e, "Exception while loading preferences from file due to : %s ", e.getMessage());
} finally {
try {
if (input != null) {
input.close();
}
} catch (IOException ex) {
Timber.e(ex, "MbtilesException thrown while closing an input stream due to: %s ", ex.getMessage());
Timber.e(ex, "Exception thrown while closing an input stream due to: %s ", ex.getMessage());
}
}
return res;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public IAnswerData resolveAnswer(String textVal, TreeElement treeElement, FormDe
break;
}
default: {
// There is a bug if we get here, so let's throw an MbtilesException
// There is a bug if we get here, so let's throw an Exception
throw createBugRuntimeException(treeElement, textVal);
}
}
Expand Down Expand Up @@ -150,7 +150,7 @@ public IAnswerData resolveAnswer(String textVal, TreeElement treeElement, FormDe
return new SelectMultiData(customSelections);
}
default: {
// There is a bug if we get here, so let's throw an MbtilesException
// There is a bug if we get here, so let's throw an Exception
throw createBugRuntimeException(treeElement, textVal);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected Integer doInBackground(Long... params) {
int wasDeleted = cr.delete(deleteForm, null, null);
deleted += wasDeleted;
} catch (Exception ex) {
Timber.e("MbtilesException during delete of: %s exception: %s", param.toString(), ex.toString());
Timber.e("Exception during delete of: %s exception: %s", param.toString(), ex.toString());
}
}
successCount = deleted;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected Integer doInBackground(Long... params) {
publishProgress(successCount, toDeleteCount);

} catch (Exception ex) {
Timber.e("MbtilesException during delete of: %s exception: %s", param.toString(), ex.toString());
Timber.e("Exception during delete of: %s exception: %s", param.toString(), ex.toString());
}
}
successCount = deleted;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ protected FECWrapper doInBackground(String... path) {
try {
loadExternalData(formMediaDir);
} catch (Exception e) {
Timber.e(e, "MbtilesException thrown while loading external data");
Timber.e(e, "Exception thrown while loading external data");
errorMsg = e.getMessage();
return null;
}
Expand Down Expand Up @@ -563,7 +563,7 @@ private void readCSV(File csv, String formHash, String pathHash) {

}
} catch (IOException e) {
Timber.e(e, "MbtilesException thrown while reading csv file");
Timber.e(e, "Exception thrown while reading csv file");
} finally {
if (withinTransaction) {
ida.commit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private String uploadMediaFile(Instance instance, String fileName) throws Upload
try {
uploadedFileId = driveHelper.uploadFileToDrive(filePath, folderId, toUpload);
} catch (IOException e) {
Timber.e(e, "MbtilesException thrown while uploading the file to drive");
Timber.e(e, "Exception thrown while uploading the file to drive");
throw new UploadException(e);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public String uploadOneSubmission(Instance instance, String urlString) throws Up
try {
contentLength = Long.parseLong(contentLengthString);
} catch (Exception e) {
Timber.e(e, "MbtilesException thrown parsing contentLength %s", contentLengthString);
Timber.e(e, "Exception thrown parsing contentLength %s", contentLengthString);
}
}

Expand Down Expand Up @@ -214,7 +214,7 @@ public String uploadOneSubmission(Instance instance, String urlString) throws Up

} catch (Exception e) {
saveFailedStatusToDatabase(instance);
throw new UploadException(FAIL + "Generic MbtilesException: "
throw new UploadException(FAIL + "Generic Exception: "
+ (e.getMessage() != null ? e.getMessage() : e.toString()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import androidx.annotation.Nullable;
import android.util.Base64;

import org.apache.commons.io.IOUtils;
Expand Down Expand Up @@ -63,6 +62,7 @@
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

import androidx.annotation.Nullable;
import timber.log.Timber;

import static org.odk.collect.android.utilities.ApplicationConstants.Namespaces.XML_OPENROSA_NAMESPACE;
Expand Down Expand Up @@ -202,7 +202,7 @@ public String getBase64EncryptedElementSignature() {
md.update(elementSignatureSource.toString().getBytes(UTF_8));
messageDigest = md.digest();
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
Timber.e(e, "MbtilesException thrown while constructing md5 hash.");
Timber.e(e, "Exception thrown while constructing md5 hash.");
throw new IllegalArgumentException(e.getMessage());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private static String actualCopy(File sourceFile, File destFile) {
} else if (e instanceof IOException) {
Timber.e(e, "IOException while copying file");
} else {
Timber.e(e, "MbtilesException while copying file");
Timber.e(e, "Exception while copying file");
}
return e.getMessage();
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ private String downloadManifestAndMediaFiles(String tempMediaPath, String finalM
finalMediaFile.getAbsolutePath());
}
}
// } catch (MbtilesException e) {
// } catch (Exception e) {
// return e.getLocalizedMessage();
//}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ public static boolean loadSharedPreferencesFromJSONFile(File src) {
Collect.getInstance().initProperties();
res = true;
} catch (IOException e) {
Timber.e(e, "MbtilesException while loading preferences from file due to : %s ", e.getMessage());
Timber.e(e, "Exception while loading preferences from file due to : %s ", e.getMessage());
} finally {
try {
if (br != null) {
br.close();
}
} catch (IOException ex) {
Timber.e(ex, "MbtilesException thrown while closing an input stream due to: %s ", ex.getMessage());
Timber.e(ex, "Exception thrown while closing an input stream due to: %s ", ex.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import timber.log.Timber;

public class WidgetAppearanceUtils {
private static final String EXCEPTION_PARSING_COLUMNS = "MbtilesException parsing columns";
private static final String EXCEPTION_PARSING_COLUMNS = "Exception parsing columns";

// Date appearances
public static final String ETHIOPIAN = "ethiopian";
Expand Down

0 comments on commit fa4c43c

Please sign in to comment.