From 44329277f73aeb343924bde0389681cb521e6fa5 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 6 Feb 2017 12:04:46 -0600 Subject: [PATCH] Update third party libraries * filepicker 4.0.0 * google-api-services-tasks v1-rev46-1.22.0 * materialdatetimepicker 3.1.1 * process-phoenix 1.1.1 * timber 4.5.1 * leakcanary 1.5 * stetho 1.4.2 --- build.gradle | 14 +++++++------- src/debug/java/org/tasks/BuildSetup.java | 9 +++++++-- src/main/java/org/tasks/Tasks.java | 4 +++- .../org/tasks/activities/TimePickerActivity.java | 3 +-- src/release/java/org/tasks/BuildSetup.java | 3 ++- 5 files changed, 20 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index fa8eae93f..abb2a6f8f 100644 --- a/build.gradle +++ b/build.gradle @@ -102,7 +102,7 @@ final DAGGER_VERSION = '2.9' final BUTTERKNIFE_VERSION = '8.5.1' final GPS_VERSION = '9.6.1' final SUPPORT_VERSION = '25.1.1' -final STETHO_VERSION = '1.4.1' +final STETHO_VERSION = '1.4.2' final TESTING_SUPPORT_VERSION = '0.5' dependencies { @@ -114,16 +114,16 @@ dependencies { debugCompile "com.facebook.stetho:stetho:${STETHO_VERSION}" debugCompile "com.facebook.stetho:stetho-timber:${STETHO_VERSION}@aar" - debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2' + debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5' compile 'com.github.rey5137:material:1.2.4' compile 'com.android.support:multidex:1.0.1' - compile 'com.nononsenseapps:filepicker:4.0.0-beta1' + compile 'com.nononsenseapps:filepicker:4.0.0' compile "com.android.support:design:${SUPPORT_VERSION}" compile "com.android.support:support-annotations:${SUPPORT_VERSION}" - compile 'com.jakewharton.timber:timber:4.3.1' + compile 'com.jakewharton.timber:timber:4.5.1' compile 'com.google.guava:guava:20.0' - compile 'com.jakewharton:process-phoenix:1.1.0' + compile 'com.jakewharton:process-phoenix:1.1.1' compile 'com.google.android.apps.dashclock:dashclock-api:2.0.0' compile 'com.twofortyfouram:android-plugin-api-for-locale:1.0.2' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' @@ -133,7 +133,7 @@ dependencies { compile ('org.scala-saddle:google-rfc-2445:20110304') { transitive = false } - compile ('com.wdullaer:materialdatetimepicker:2.5.0') { + compile ('com.wdullaer:materialdatetimepicker:3.1.1') { exclude group: 'com.android.support', module: 'support-v4' } @@ -141,7 +141,7 @@ dependencies { googleplayCompile "com.google.android.gms:play-services-analytics:${GPS_VERSION}" googleplayCompile "com.google.android.gms:play-services-auth:${GPS_VERSION}" googleplayCompile "com.google.android.gms:play-services-places:${GPS_VERSION}" - googleplayCompile 'com.google.apis:google-api-services-tasks:v1-rev45-1.22.0' + googleplayCompile 'com.google.apis:google-api-services-tasks:v1-rev46-1.22.0' googleplayCompile 'com.google.api-client:google-api-client-android:1.22.0' amazonCompile "com.google.android.gms:play-services-analytics:${GPS_VERSION}" diff --git a/src/debug/java/org/tasks/BuildSetup.java b/src/debug/java/org/tasks/BuildSetup.java index 13cf1ff92..b739b7698 100644 --- a/src/debug/java/org/tasks/BuildSetup.java +++ b/src/debug/java/org/tasks/BuildSetup.java @@ -22,11 +22,15 @@ public class BuildSetup { this.context = context; } - public void setup() { + public boolean setup() { Timber.plant(new Timber.DebugTree()); Timber.plant(new StethoTree()); Stetho.initializeWithDefaults(context); - LeakCanary.install((Application) context.getApplicationContext()); + Application application = (Application) context.getApplicationContext(); + if (LeakCanary.isInAnalyzerProcess(context)) { + return false; + } + LeakCanary.install(application); StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() @@ -38,5 +42,6 @@ public class BuildSetup { .detectLeakedClosableObjects() .penaltyLog() .build()); + return true; } } diff --git a/src/main/java/org/tasks/Tasks.java b/src/main/java/org/tasks/Tasks.java index a409a5110..aa7925ec1 100644 --- a/src/main/java/org/tasks/Tasks.java +++ b/src/main/java/org/tasks/Tasks.java @@ -27,7 +27,9 @@ public class Tasks extends InjectingApplication { tracker.setTrackingEnabled(preferences.isTrackingEnabled()); - buildSetup.setup(); + if (!buildSetup.setup()) { + return; + } flavorSetup.setup(); teslaUnreadReceiver.setEnabled(preferences.getBoolean(R.string.p_tesla_unread_enabled, false)); diff --git a/src/main/java/org/tasks/activities/TimePickerActivity.java b/src/main/java/org/tasks/activities/TimePickerActivity.java index bbda85673..9ecbafd1d 100644 --- a/src/main/java/org/tasks/activities/TimePickerActivity.java +++ b/src/main/java/org/tasks/activities/TimePickerActivity.java @@ -5,7 +5,6 @@ import android.content.Intent; import android.os.Bundle; import android.text.format.DateFormat; -import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout; import com.wdullaer.materialdatetimepicker.time.TimePickerDialog; import org.tasks.dialogs.MyTimePickerDialog; @@ -66,7 +65,7 @@ public class TimePickerActivity extends InjectingAppCompatActivity implements Ti } @Override - public void onTimeSet(RadialPickerLayout radialPickerLayout, final int hours, final int minutes, int seconds) { + public void onTimeSet(TimePickerDialog timePickerDialog, final int hours, final int minutes, int seconds) { timeSet(hours, minutes); } diff --git a/src/release/java/org/tasks/BuildSetup.java b/src/release/java/org/tasks/BuildSetup.java index 66a45fc67..a4a405559 100644 --- a/src/release/java/org/tasks/BuildSetup.java +++ b/src/release/java/org/tasks/BuildSetup.java @@ -13,8 +13,9 @@ public class BuildSetup { } - public void setup() { + public boolean setup() { Timber.plant(new ErrorReportingTree()); + return true; } private static class ErrorReportingTree extends Timber.Tree {