From 86ca9613b8edc61a64a3289725bb90ff0c5751a5 Mon Sep 17 00:00:00 2001 From: ligi Date: Fri, 13 Mar 2015 11:53:59 +0100 Subject: [PATCH] Use Joda-Time Android --- build.gradle | 2 +- src/main/java/org/ligi/passandroid/App.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f3e58fa5..6c452363 100644 --- a/build.gradle +++ b/build.gradle @@ -102,7 +102,7 @@ dependencies { compile 'com.google.code.gson:gson:2.3.1' compile 'net.lingala.zip4j:zip4j:1.3.2' compile 'com.jakewharton:butterknife:6.1.0' - compile 'joda-time:joda-time:2.7' + compile 'net.danlew:android.joda:2.7.1' compile 'com.squareup:otto:1.3.6' compile 'com.android.support:support-v4:22.0.0' diff --git a/src/main/java/org/ligi/passandroid/App.java b/src/main/java/org/ligi/passandroid/App.java index dcd41d7f..af056ab5 100644 --- a/src/main/java/org/ligi/passandroid/App.java +++ b/src/main/java/org/ligi/passandroid/App.java @@ -3,10 +3,9 @@ package org.ligi.passandroid; import android.app.Application; import android.content.Context; import android.os.Environment; - import com.squareup.otto.Bus; import com.squareup.otto.ThreadEnforcer; - +import net.danlew.android.joda.JodaTimeAndroid; import org.ligi.passandroid.model.AndroidFileSystemPassStore; import org.ligi.passandroid.model.PassStore; import org.ligi.passandroid.model.Settings; @@ -24,6 +23,8 @@ public class App extends Application { public void onCreate() { super.onCreate(); + JodaTimeAndroid.init(this); + Tracker.init(this); initTraceDroid(); @@ -50,8 +51,8 @@ public class App extends Application { } public static PassStore getPassStore() { - if (passStore==null) { - passStore=new AndroidFileSystemPassStore(instance); + if (passStore == null) { + passStore = new AndroidFileSystemPassStore(instance); } return passStore; }