Update to Timber 4.7.0

pull/699/head
Alex Baker 8 years ago
parent b7ca37b845
commit 8bb71c0898

@ -147,7 +147,7 @@ dependencies {
implementation "com.android.support:support-v13:${SUPPORT_VERSION}" implementation "com.android.support:support-v13:${SUPPORT_VERSION}"
implementation "com.android.support:cardview-v7:${SUPPORT_VERSION}" implementation "com.android.support:cardview-v7:${SUPPORT_VERSION}"
implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.jakewharton.timber:timber:4.5.1' implementation 'com.jakewharton.timber:timber:4.7.0'
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5' implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
//noinspection GradleDependency //noinspection GradleDependency
implementation 'com.google.guava:guava:20.0' implementation 'com.google.guava:guava:20.0'

@ -61,7 +61,7 @@ public class Tracker {
} }
public void reportException(Thread thread, Throwable t) { public void reportException(Thread thread, Throwable t) {
Timber.e(t, t.getMessage()); Timber.e(t);
tracker.send( tracker.send(
new HitBuilders.ExceptionBuilder() new HitBuilders.ExceptionBuilder()
.setDescription(exceptionParser.getDescription(thread.getName(), t)) .setDescription(exceptionParser.getDescription(thread.getName(), t))

@ -85,10 +85,10 @@ public class PlayServices {
context, credential.getSelectedAccount(), "oauth2:" + TasksScopes.TASKS, null); context, credential.getSelectedAccount(), "oauth2:" + TasksScopes.TASKS, null);
return true; return true;
} catch (GoogleAuthException e) { } catch (GoogleAuthException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return false; return false;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return true; return true;
} }
} }
@ -108,11 +108,11 @@ public class PlayServices {
GoogleAuthUtil.getToken(activity, account, "oauth2:" + TasksScopes.TASKS, null); GoogleAuthUtil.getToken(activity, account, "oauth2:" + TasksScopes.TASKS, null);
handler.authenticationSuccessful(accountName); handler.authenticationSuccessful(accountName);
} catch (UserRecoverableAuthException e) { } catch (UserRecoverableAuthException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
activity.startActivityForResult( activity.startActivityForResult(
e.getIntent(), GtasksLoginActivity.RC_REQUEST_OAUTH); e.getIntent(), GtasksLoginActivity.RC_REQUEST_OAUTH);
} catch (GoogleAuthException | IOException e) { } catch (GoogleAuthException | IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
handler.authenticationFailed(activity.getString(R.string.gtasks_GLA_errorIOAuth)); handler.authenticationFailed(activity.getString(R.string.gtasks_GLA_errorIOAuth));
} }
}) })

@ -21,10 +21,10 @@ public class PlacePicker {
try { try {
return builder.build(activity); return builder.build(activity);
} catch (GooglePlayServicesRepairableException e) { } catch (GooglePlayServicesRepairableException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
activity.startActivity(e.getIntent()); activity.startActivity(e.getIntent());
} catch (GooglePlayServicesNotAvailableException e) { } catch (GooglePlayServicesNotAvailableException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
Toast.makeText( Toast.makeText(
activity, R.string.common_google_play_services_notification_ticker, Toast.LENGTH_LONG) activity, R.string.common_google_play_services_notification_ticker, Toast.LENGTH_LONG)
.show(); .show();

@ -124,10 +124,10 @@ public class AndroidUtilities {
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
// failed parse to number // failed parse to number
putter.put(object, key, 's', value); putter.put(object, key, 's', value);
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} catch (IndexOutOfBoundsException e) { } catch (IndexOutOfBoundsException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -237,7 +237,7 @@ public class AndroidUtilities {
inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0); inputMethodManager.hideSoftInputFromWindow(currentFocus.getWindowToken(), 0);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -22,7 +22,7 @@ public class DialogUtilities {
try { try {
dialog.dismiss(); dialog.dismiss();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
}); });
} }

@ -97,7 +97,7 @@ public class TasksXmlImporter {
try { try {
performImport(); performImport();
} catch (IOException | XmlPullParserException e) { } catch (IOException | XmlPullParserException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
}) })
.start(); .start();
@ -194,7 +194,7 @@ public class TasksXmlImporter {
} }
} catch (Exception e) { } catch (Exception e) {
errorCount++; errorCount++;
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -304,7 +304,7 @@ public class TasksXmlImporter {
} }
} catch (Exception e) { } catch (Exception e) {
errorCount++; errorCount++;
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -84,12 +84,12 @@ public class PhoneStateChangedReceiver extends InjectingBroadcastReceiver {
try { try {
calls = getMissedCalls(); calls = getMissedCalls();
} catch (Exception e) { // Sometimes database is locked, retry once } catch (Exception e) { // Sometimes database is locked, retry once
Timber.e(e, e.getMessage()); Timber.e(e);
AndroidUtilities.sleepDeep(300L); AndroidUtilities.sleepDeep(300L);
try { try {
calls = getMissedCalls(); calls = getMissedCalls();
} catch (Exception e2) { } catch (Exception e2) {
Timber.e(e2, e2.getMessage()); Timber.e(e2);
calls = null; calls = null;
} }
} }
@ -125,7 +125,7 @@ public class PhoneStateChangedReceiver extends InjectingBroadcastReceiver {
triggerMissedCallNotification(name, number, contactId); triggerMissedCallNotification(name, number, contactId);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} finally { } finally {
if (calls != null) { if (calls != null) {
calls.close(); calls.close();
@ -257,7 +257,7 @@ public class PhoneStateChangedReceiver extends InjectingBroadcastReceiver {
try { try {
b = BitmapFactory.decodeStream(input); b = BitmapFactory.decodeStream(input);
} catch (OutOfMemoryError e) { } catch (OutOfMemoryError e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
return b; return b;

@ -127,7 +127,7 @@ public abstract class Database extends RoomDatabase {
database = getOpenHelper().getWritableDatabase(); database = getOpenHelper().getWritableDatabase();
} catch (Exception e) { } catch (Exception e) {
tracker.reportEvent(Tracking.Events.DB_OPEN_FAILED, e.getMessage()); tracker.reportEvent(Tracking.Events.DB_OPEN_FAILED, e.getMessage());
Timber.e(e, e.getMessage()); Timber.e(e);
throw new IllegalStateException(e); throw new IllegalStateException(e);
} }
} }
@ -147,7 +147,7 @@ public abstract class Database extends RoomDatabase {
try { try {
database.close(); database.close();
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
database = null; database = null;

@ -458,7 +458,7 @@ public class Task implements Parcelable {
long value = Long.parseLong(uuid); long value = Long.parseLong(uuid);
return value > 0; return value > 0;
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return isUuidEmpty(uuid); return isUuidEmpty(uuid);
} }
} }

@ -68,7 +68,7 @@ public class FilesControlSet extends TaskEditControlFragment {
mediaPlayer.prepare(); mediaPlayer.prepare();
mediaPlayer.start(); mediaPlayer.start();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
handler.playbackFailed(); handler.playbackFailed();
} }
} }
@ -202,7 +202,7 @@ public class FilesControlSet extends TaskEditControlFragment {
context, filePath, TaskAttachment.FILE_TYPE_IMAGE + "*"); context, filePath, TaskAttachment.FILE_TYPE_IMAGE + "*");
getActivity().startActivity(intent); getActivity().startActivity(intent);
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
Toast.makeText(context, R.string.no_application_found, Toast.LENGTH_SHORT).show(); Toast.makeText(context, R.string.no_application_found, Toast.LENGTH_SHORT).show();
} }
} else { } else {
@ -229,7 +229,7 @@ public class FilesControlSet extends TaskEditControlFragment {
Intent intent = FileHelper.getReadableActionView(context, file, type); Intent intent = FileHelper.getReadableActionView(context, file, type);
getActivity().startActivity(intent); getActivity().startActivity(intent);
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
Toast.makeText(context, R.string.file_type_unhandled, Toast.LENGTH_LONG).show(); Toast.makeText(context, R.string.file_type_unhandled, Toast.LENGTH_LONG).show();
} }
} }

@ -59,7 +59,7 @@ public class CalendarAlarmReceiver extends InjectingBroadcastReceiver {
} }
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
// Some cursor read failed, or badly formed uri // Some cursor read failed, or badly formed uri
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -119,7 +119,7 @@ public class GCalHelper {
return eventUri; return eventUri;
} catch (Exception e) { } catch (Exception e) {
// won't work on emulator // won't work on emulator
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return null; return null;

@ -118,7 +118,7 @@ public class GtasksTaskListUpdater {
parents.put(taskId, parent); parents.put(taskId, parent);
siblings.put(taskId, sibling); siblings.put(taskId, sibling);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
previousTask.set(taskId); previousTask.set(taskId);

@ -143,7 +143,7 @@ class OrderedMetadataListFragmentHelper {
updater.moveTo(list, targetTaskId, destinationTaskId); updater.moveTo(list, targetTaskId, destinationTaskId);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -157,7 +157,7 @@ class OrderedMetadataListFragmentHelper {
try { try {
updater.indent(list, targetTaskId, delta); updater.indent(list, targetTaskId, delta);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -55,7 +55,7 @@ public class GtasksApiUtilities {
Date returnDate = new Date(date.getTime() + date.getTimezoneOffset() * 60000); Date returnDate = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
return returnDate.getTime(); return returnDate.getTime();
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return 0; return 0;
} }
} }

@ -146,7 +146,7 @@ public class GtasksInvoker {
try { try {
return Thread.currentThread().getStackTrace()[4].getMethodName(); return Thread.currentThread().getStackTrace()[4].getMethodName();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
return ""; return "";

@ -39,7 +39,7 @@ public class MoveRequest {
try { try {
return executePush(); return executePush();
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
recover(); recover();
return executePush(); return executePush();
} }

@ -201,7 +201,7 @@ public class GtasksSyncService {
try { try {
op = queue.take(); op = queue.take();
} catch (InterruptedException e) { } catch (InterruptedException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
continue; continue;
} }
try { try {

@ -87,7 +87,7 @@ public class Astrid2TaskProvider extends InjectingContentProvider {
try { try {
context.getContentResolver().notifyChange(CONTENT_URI, null); context.getContentResolver().notifyChange(CONTENT_URI, null);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -144,7 +144,7 @@ public class Astrid2TaskProvider extends InjectingContentProvider {
try { try {
m = MessageDigest.getInstance("MD5"); m = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException e) { } catch (NoSuchAlgorithmException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return -1; return -1;
} }

@ -262,7 +262,7 @@ public class RepeatTaskHelper {
return; return;
} }
} catch (ParseException e) { } catch (ParseException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return; return;
} }

@ -177,7 +177,7 @@ public class TaskCreator {
try { try {
TitleParser.parse(tagService, task, tags); TitleParser.parse(tagService, task, tags);
} catch (Throwable e) { } catch (Throwable e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
task.setTags(tags); task.setTags(tags);

@ -143,7 +143,7 @@ class AstridOrderedListFragmentHelper {
updater.moveTo(list, fragment.getFilter(), targetTaskId, destinationTaskId); updater.moveTo(list, fragment.getFilter(), targetTaskId, destinationTaskId);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -157,7 +157,7 @@ class AstridOrderedListFragmentHelper {
try { try {
updater.indent(list, fragment.getFilter(), targetTaskId, delta); updater.indent(list, fragment.getFilter(), targetTaskId, delta);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -52,7 +52,7 @@ public class SubtasksFilterUpdater {
JSONArray tree = new JSONArray(serializedTree); JSONArray tree = new JSONArray(serializedTree);
recursivelyBuildChildren(root, tree, callback); recursivelyBuildChildren(root, tree, callback);
} catch (JSONException e) { } catch (JSONException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return root; return root;
} }

@ -56,7 +56,7 @@ public class SubtasksHelper {
ids.add(Long.parseLong(idString)); ids.add(Long.parseLong(idString));
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
return ids; return ids;
@ -110,7 +110,7 @@ public class SubtasksHelper {
try { try {
localId = Long.parseLong(uuid); localId = Long.parseLong(uuid);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return localId; return localId;
}); });

@ -25,7 +25,7 @@ public class MultilineListPreference extends ListPreference {
super.onBindView(view); super.onBindView(view);
} catch (Exception e) { } catch (Exception e) {
// happens on 4.0 emulators // happens on 4.0 emulators
Timber.e(e, e.getMessage()); Timber.e(e);
} }
MultilineHelper.makeMultiline(view); MultilineHelper.makeMultiline(view);
} }

@ -305,7 +305,7 @@ public class NumberPicker extends LinearLayout
try { try {
return Integer.parseInt(str); return Integer.parseInt(str);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return mStart; return mStart;
} }
} }

@ -459,7 +459,7 @@ public class TitleParser {
interval = Integer.parseInt(intervalStr); interval = Integer.parseInt(intervalStr);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
// Ah well // Ah well
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -100,7 +100,7 @@ public class VoiceOutputAssistant implements OnInitListener {
mTts = null; mTts = null;
isTTSInitialized = false; isTTSInitialized = false;
} catch (VerifyError e) { } catch (VerifyError e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -38,6 +38,7 @@ package net.dinglisch.android.tasker;
// v1.8 20161002 // v1.8 20161002
// added hostSupportsKeyEncoding(), setKeyEncoding() and Host.getKeysWithEncoding() // added hostSupportsKeyEncoding(), setKeyEncoding() and Host.getKeysWithEncoding()
import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
@ -45,6 +46,7 @@ import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
@SuppressLint("LogNotTimber")
public class TaskerPlugin { public class TaskerPlugin {
/** @see Setting#hostSupportsOnFireVariableReplacement(Bundle) */ /** @see Setting#hostSupportsOnFireVariableReplacement(Bundle) */

@ -170,7 +170,7 @@ public class AddAttachmentActivity extends InjectingAppCompatActivity
} }
return file; return file;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return null; return null;
} }
@ -196,7 +196,7 @@ public class AddAttachmentActivity extends InjectingAppCompatActivity
try { try {
AndroidUtilities.copyFile(src, dst); AndroidUtilities.copyFile(src, dst);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
Toast.makeText(this, R.string.file_err_copy, Toast.LENGTH_LONG).show(); Toast.makeText(this, R.string.file_err_copy, Toast.LENGTH_LONG).show();
return null; return null;
} }

@ -107,7 +107,7 @@ public class CameraActivity extends InjectingAppCompatActivity {
} }
return file; return file;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return null; return null;
} }

@ -135,7 +135,7 @@ public class TasksJsonExporter {
onFinishExport(output); onFinishExport(output);
} }
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} finally { } finally {
post( post(
() -> { () -> {

@ -110,7 +110,7 @@ public class TasksJsonImporter {
try { try {
performImport(); performImport();
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
}) })
.start(); .start();

@ -87,7 +87,7 @@ public class Inventory {
return Security.verifyPurchase( return Security.verifyPurchase(
billingKey, purchase.getOriginalJson(), purchase.getSignature()); billingKey, purchase.getOriginalJson(), purchase.getSignature());
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return false; return false;
} }
} }

@ -240,7 +240,7 @@ public class CaldavSettingsActivity extends ThemedInjectingAppCompatActivity
try { try {
host = IDN.toASCII(host); host = IDN.toASCII(host);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e.getMessage(), e); Timber.e(e);
} }
String path = baseURL.getEncodedPath(); String path = baseURL.getEncodedPath();
int port = baseURL.getPort(); int port = baseURL.getPort();

@ -215,9 +215,9 @@ public class CaldavSynchronizer {
Timber.d("UPDATE %s", caldavAccount); Timber.d("UPDATE %s", caldavAccount);
caldavDao.update(caldavAccount); caldavDao.update(caldavAccount);
} catch (IOException | HttpException | DavException e) { } catch (IOException | HttpException | DavException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
localBroadcastManager.broadcastRefresh(); localBroadcastManager.broadcastRefresh();
@ -230,7 +230,7 @@ public class CaldavSynchronizer {
try { try {
pushTask(task, caldavAccount, httpClient, httpUrl); pushTask(task, caldavAccount, httpClient, httpUrl);
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -246,11 +246,11 @@ public class CaldavSynchronizer {
} }
} catch (HttpException e) { } catch (HttpException e) {
if (e.getStatus() != 404) { if (e.getStatus() != 404) {
Timber.e(e, e.getMessage()); Timber.e(e);
return false; return false;
} }
} catch (IOException e) { } catch (IOException e) {
Timber.e(e.getMessage(), e); Timber.e(e);
return false; return false;
} }
caldavDao.delete(caldavTask); caldavDao.delete(caldavTask);
@ -308,7 +308,7 @@ public class CaldavSynchronizer {
caldavTask.setVtodo(new String(data)); caldavTask.setVtodo(new String(data));
} }
} catch (HttpException e) { } catch (HttpException e) {
Timber.e(e.getMessage(), e); Timber.e(e);
return; return;
} }
@ -327,7 +327,7 @@ public class CaldavSynchronizer {
try { try {
tasks = at.bitfire.ical4android.Task.fromReader(new StringReader(vtodo)); tasks = at.bitfire.ical4android.Task.fromReader(new StringReader(vtodo));
} catch (InvalidCalendarException e) { } catch (InvalidCalendarException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return; return;
} }

@ -53,7 +53,7 @@ class TaskConverter {
Task.createDueDate( Task.createDueDate(
URGENCY_SPECIFIC_DAY, DUE_DATE_FORMAT.parse(due.getValue()).getTime())); URGENCY_SPECIFIC_DAY, DUE_DATE_FORMAT.parse(due.getValue()).getTime()));
} catch (ParseException e) { } catch (ParseException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -93,7 +93,7 @@ class TaskConverter {
at.bitfire.ical4android.Task.fromReader(new StringReader(caldavTask.getVtodo())).get(0); at.bitfire.ical4android.Task.fromReader(new StringReader(caldavTask.getVtodo())).get(0);
} }
} catch (IOException | InvalidCalendarException e) { } catch (IOException | InvalidCalendarException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
if (remote == null) { if (remote == null) {
remote = new at.bitfire.ical4android.Task(); remote = new at.bitfire.ical4android.Task();
@ -107,7 +107,7 @@ class TaskConverter {
try { try {
remote.setDue(new Due(newDateTime(task.getDueDate()).toString("yyyyMMdd"))); remote.setDue(new Due(newDateTime(task.getDueDate()).toString("yyyyMMdd")));
} catch (ParseException e) { } catch (ParseException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
remote.setDue( remote.setDue(
@ -124,7 +124,7 @@ class TaskConverter {
String rrule = task.getRecurrenceWithoutFrom().replace("RRULE:", ""); String rrule = task.getRecurrenceWithoutFrom().replace("RRULE:", "");
remote.setRRule(new RRule(rrule)); remote.setRRule(new RRule(rrule));
} catch (ParseException e) { } catch (ParseException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
remote.setLastModified(newDateTime(task.getModificationDate()).toUTC().getMillis()); remote.setLastModified(newDateTime(task.getModificationDate()).toUTC().getMillis());

@ -54,7 +54,7 @@ public class CalendarEventAttendeeProvider {
} }
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} finally { } finally {
if (cursor != null) { if (cursor != null) {
cursor.close(); cursor.close();

@ -118,7 +118,7 @@ public class CalendarEventProvider {
} }
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} finally { } finally {
if (cursor != null) { if (cursor != null) {
cursor.close(); cursor.close();

@ -74,7 +74,7 @@ public class CalendarProvider {
} }
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} finally { } finally {
if (cursor != null) { if (cursor != null) {
cursor.close(); cursor.close();

@ -97,7 +97,7 @@ public class DashClockExtension extends com.google.android.apps.dashclock.api.Da
try { try {
publishUpdate(data); publishUpdate(data);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -87,7 +87,7 @@ public class UserActivity implements Parcelable {
} }
return null; return null;
} catch (JSONException e) { } catch (JSONException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return null; return null;
} }
} }

@ -31,7 +31,7 @@ public class Migrations {
try { try {
database.execSQL("ALTER TABLE `store` ADD COLUMN `value4` TEXT DEFAULT -1"); database.execSQL("ALTER TABLE `store` ADD COLUMN `value4` TEXT DEFAULT -1");
} catch (SQLiteException e) { } catch (SQLiteException e) {
Timber.w(e, e.getMessage()); Timber.w(e);
} }
} }
}; };

@ -77,7 +77,7 @@ public class CommentBarFragment extends TaskEditControlFragment {
json.put("uri", uri.toString()); json.put("uri", uri.toString());
return json; return json;
} catch (JSONException e) { } catch (JSONException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return null; return null;
} }

@ -69,7 +69,7 @@ public class CreateListDialog extends InjectingDialogFragment {
try { try {
return gtasksInvoker.createGtaskList(name); return gtasksInvoker.createGtaskList(name);
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return null; return null;
} }
} }

@ -69,7 +69,7 @@ public class DeleteListDialog extends InjectingDialogFragment {
gtasksInvoker.deleteGtaskList(id); gtasksInvoker.deleteGtaskList(id);
return true; return true;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return false; return false;
} }
} }

@ -129,10 +129,10 @@ public class GoogleTaskSynchronizer {
synchronize(); synchronize();
gtasksPreferenceService.recordSuccessfulSync(); gtasksPreferenceService.recordSuccessfulSync();
} catch (UserRecoverableAuthIOException e) { } catch (UserRecoverableAuthIOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
sendNotification(context, e.getIntent()); sendNotification(context, e.getIntent());
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} catch (Exception e) { } catch (Exception e) {
tracker.reportException(e); tracker.reportException(e);
} finally { } finally {
@ -197,7 +197,7 @@ public class GoogleTaskSynchronizer {
} catch (UserRecoverableAuthIOException e) { } catch (UserRecoverableAuthIOException e) {
throw e; throw e;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -268,7 +268,7 @@ public class GoogleTaskSynchronizer {
try { try {
invoker.updateGtask(listId, remoteModel); invoker.updateGtask(listId, remoteModel);
} catch (HttpNotFoundException e) { } catch (HttpNotFoundException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
googleTaskDao.delete(gtasksMetadata); googleTaskDao.delete(gtasksMetadata);
return; return;
} }
@ -353,7 +353,7 @@ public class GoogleTaskSynchronizer {
} catch (UserRecoverableAuthIOException e) { } catch (UserRecoverableAuthIOException e) {
throw e; throw e;
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -32,7 +32,7 @@ public class GoogleTasksUnsuccessfulResponseHandler implements HttpUnsuccessfulR
public boolean handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry) public boolean handleResponse(HttpRequest request, HttpResponse response, boolean supportsRetry)
throws IOException { throws IOException {
HttpResponseException httpResponseException = new HttpResponseException(response); HttpResponseException httpResponseException = new HttpResponseException(response);
Timber.e(httpResponseException, httpResponseException.getMessage()); Timber.e(httpResponseException);
if (!supportsRetry) { if (!supportsRetry) {
return false; return false;
} }

@ -73,7 +73,7 @@ public class RenameListDialog extends InjectingDialogFragment {
try { try {
return gtasksInvoker.renameGtaskList(id, name); return gtasksInvoker.renameGtaskList(id, name);
} catch (IOException e) { } catch (IOException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return null; return null;
} }
} }

@ -16,7 +16,7 @@ class Dagger {
try { try {
localeContext = Locale.getInstance(localeContext).createConfigurationContext(localeContext); localeContext = Locale.getInstance(localeContext).createConfigurationContext(localeContext);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e.getMessage(), e); Timber.e(e);
} }
applicationComponent = applicationComponent =

@ -16,7 +16,7 @@ public abstract class InjectingJobIntentService extends JobIntentService {
try { try {
doWork(intent); doWork(intent);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -67,7 +67,7 @@ public abstract class InjectingPreferenceActivity extends AppCompatPreferenceAct
ActivityInfo activityInfo = getPackageManager().getActivityInfo(componentName, 0); ActivityInfo activityInfo = getPackageManager().getActivityInfo(componentName, 0);
toolbar.setTitle(activityInfo.labelRes); toolbar.setTitle(activityInfo.labelRes);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
toolbar.setTitle(getTitle()); toolbar.setTitle(getTitle());
} }
toolbar.setNavigationIcon(ContextCompat.getDrawable(this, R.drawable.ic_arrow_back_24dp)); toolbar.setNavigationIcon(ContextCompat.getDrawable(this, R.drawable.ic_arrow_back_24dp));

@ -109,7 +109,7 @@ public class AfterSaveIntentService extends InjectingJobIntentService {
context.getString(R.string.gcal_completed_title, task.getTitle())); context.getString(R.string.gcal_completed_title, task.getTitle()));
cr.update(Uri.parse(calendarUri), values, null, null); cr.update(Uri.parse(calendarUri), values, null, null);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -56,14 +56,14 @@ public class BackupJob extends Job {
try { try {
deleteOldBackups(); deleteOldBackups();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
try { try {
tasksJsonExporter.exportTasks( tasksJsonExporter.exportTasks(
context, TasksJsonExporter.ExportType.EXPORT_TYPE_SERVICE, null); context, TasksJsonExporter.ExportType.EXPORT_TYPE_SERVICE, null);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -72,7 +72,7 @@ public class JobCreator implements com.evernote.android.job.JobCreator {
case TAG_REFRESH: case TAG_REFRESH:
return new RefreshJob(refreshScheduler, localBroadcastManager); return new RefreshJob(refreshScheduler, localBroadcastManager);
default: default:
Timber.e("Unhandled tag: " + tag); Timber.e("Unhandled tag: %s", tag);
return null; return null;
} }
} }

@ -39,7 +39,7 @@ public class TaskerTaskCreator {
new DateTime(dueDate.getYear(), dueDate.getMonthValue(), dueDate.getDayOfMonth()); new DateTime(dueDate.getYear(), dueDate.getMonthValue(), dueDate.getDayOfMonth());
task.setDueDate(Task.createDueDate(Task.URGENCY_SPECIFIC_DAY, dt.getMillis())); task.setDueDate(Task.createDueDate(Task.URGENCY_SPECIFIC_DAY, dt.getMillis()));
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -55,7 +55,7 @@ public class TaskerTaskCreator {
.withMinuteOfHour(dueTime.getMinute()) .withMinuteOfHour(dueTime.getMinute())
.getMillis())); .getMillis()));
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -65,7 +65,7 @@ public class TaskerTaskCreator {
int priority = Integer.parseInt(priorityString); int priority = Integer.parseInt(priorityString);
task.setImportance(Math.max(0, Math.min(3, priority))); task.setImportance(Math.max(0, Math.min(3, priority)));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -120,7 +120,7 @@ public class DefaultFilterProvider {
return filter; return filter;
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
return def; return def;

@ -84,7 +84,7 @@ public class Device {
"----------", "----------",
"")); ""));
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return ""; return "";
} }

@ -67,7 +67,7 @@ public class MiscellaneousPreferences extends InjectingPreferenceActivity {
} }
} catch (VerifyError e) { } catch (VerifyError e) {
// unavailable // unavailable
Timber.e(e, e.getMessage()); Timber.e(e);
} }
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }
@ -135,7 +135,7 @@ public class MiscellaneousPreferences extends InjectingPreferenceActivity {
voiceOutputAssistant.shutdown(); voiceOutputAssistant.shutdown();
} }
} catch (VerifyError e) { } catch (VerifyError e) {
Timber.e(e, e.getMessage()); Timber.e(e);
preference.setEnabled(false); preference.setEnabled(false);
preferences.setBoolean(preference.getKey(), false); preferences.setBoolean(preference.getKey(), false);
} }

@ -136,7 +136,7 @@ public class Preferences {
p -> p ->
new GsonBuilder().create().fromJson(p, com.android.billingclient.api.Purchase.class)); new GsonBuilder().create().fromJson(p, com.android.billingclient.api.Purchase.class));
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return emptySet(); return emptySet();
} }
} }
@ -149,7 +149,7 @@ public class Preferences {
newHashSet(transform(purchases, p -> new GsonBuilder().create().toJson(p)))); newHashSet(transform(purchases, p -> new GsonBuilder().create().toJson(p))));
editor.apply(); editor.apply();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
@ -254,7 +254,7 @@ public class Preferences {
try { try {
return Integer.parseInt(value); return Integer.parseInt(value);
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return defaultValue; return defaultValue;
} }
} }
@ -279,7 +279,7 @@ public class Preferences {
try { try {
return prefs.getBoolean(key, defValue); return prefs.getBoolean(key, defValue);
} catch (ClassCastException e) { } catch (ClassCastException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
return defValue; return defValue;
} }
} }

@ -52,7 +52,7 @@ public class Badger {
} }
enabled = newValue; enabled = newValue;
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -78,7 +78,7 @@ public class RepeatConfirmationReceiver extends BroadcastReceiver {
} }
task.setRecurrence(rrule, task.repeatAfterCompletion()); task.setRecurrence(rrule, task.repeatAfterCompletion());
} catch (ParseException e) { } catch (ParseException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
taskDao.save(task); taskDao.save(task);
}) })

@ -186,7 +186,7 @@ public class CustomRecurrenceDialog extends InjectingDialogFragment {
rrule = new RRule(rule); rrule = new RRule(rule);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
if (rrule == null) { if (rrule == null) {
rrule = new RRule(); rrule = new RRule();

@ -28,7 +28,7 @@ public class SyncExecutor {
try { try {
executor.execute(wrapWithExceptionHandling(callback, command)); executor.execute(wrapWithExceptionHandling(callback, command));
} catch (RejectedExecutionException e) { } catch (RejectedExecutionException e) {
Timber.e(e, e.getMessage()); Timber.e(e);
tracker.reportException(e); tracker.reportException(e);
callback.finished(); callback.finished();
} }
@ -40,7 +40,7 @@ public class SyncExecutor {
try { try {
command.run(); command.run();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
tracker.reportException(e); tracker.reportException(e);
executor.shutdownNow(); executor.shutdownNow();
callback.finished(); callback.finished();

@ -332,7 +332,7 @@ class ViewHolder extends RecyclerView.ViewHolder {
action.intent.send(); action.intent.send();
} catch (PendingIntent.CanceledException e) { } catch (PendingIntent.CanceledException e) {
// Oh well // Oh well
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }

@ -89,7 +89,7 @@ public class CalendarControlSet extends TaskEditControlFragment {
calendarId = null; calendarId = null;
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
tracker.reportException(e); tracker.reportException(e);
calendarId = null; calendarId = null;
} }
@ -186,7 +186,7 @@ public class CalendarControlSet extends TaskEditControlFragment {
startActivity(intent); startActivity(intent);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }
} }
@ -261,7 +261,7 @@ public class CalendarControlSet extends TaskEditControlFragment {
startActivity(intent); startActivity(intent);
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
Toast.makeText(getActivity(), R.string.gcal_TEA_error, Toast.LENGTH_LONG).show(); Toast.makeText(getActivity(), R.string.gcal_TEA_error, Toast.LENGTH_LONG).show();
} finally { } finally {
cursor.close(); cursor.close();

@ -152,7 +152,7 @@ public class NavigationDrawerFragment extends InjectingFragment {
localBroadcastManager.unregisterReceiver(refreshReceiver); localBroadcastManager.unregisterReceiver(refreshReceiver);
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
// Might not have fully initialized // Might not have fully initialized
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -31,7 +31,7 @@ public abstract class ProgressDialogAsyncTask extends AsyncTask<Void, Void, Inte
try { try {
progressDialog.dismiss(); progressDialog.dismiss();
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

@ -192,7 +192,7 @@ class ScrollableViewsFactory implements RemoteViewsService.RemoteViewsFactory {
return row; return row;
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
return null; return null;

@ -95,7 +95,7 @@ public class TasksWidget extends InjectingAppWidgetProvider {
appWidgetManager.updateAppWidget(id, createScrollableWidget(context, id)); appWidgetManager.updateAppWidget(id, createScrollableWidget(context, id));
} }
} catch (Exception e) { } catch (Exception e) {
Timber.e(e, e.getMessage()); Timber.e(e);
} }
} }

Loading…
Cancel
Save