From 02781c51138e5398b3ce768026099a72cc12c35e Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 7 Aug 2018 08:57:14 -0700 Subject: [PATCH 1/2] use different (older) crashlytics (untested) For some reason my laptop wouldn't build without this change. No idea what happened to the newer version I was using or if the change works (beyond compiling). Should be easy to find the change later if it's a problem. --- xwords4/android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/android/app/build.gradle b/xwords4/android/app/build.gradle index 6c64cff56..0ca4752d2 100644 --- a/xwords4/android/app/build.gradle +++ b/xwords4/android/app/build.gradle @@ -205,7 +205,7 @@ dependencies { // 2.6.8 is probably as far forward as I can go without upping my // min-supported SDK version - xw4dImplementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') { + xw4dImplementation('com.crashlytics.sdk.android:crashlytics:2.6.3@aar') { transitive = true; } } From dfa308c1f5a7eeb8adfc51671dc7b0e55e31a2ca Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 7 Aug 2018 09:01:17 -0700 Subject: [PATCH 2/2] pull timestamp out of DB as a long for better formatting, eventually. --- .../main/java/org/eehouse/android/xw4/DBUtils.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBUtils.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBUtils.java index 63b08f0cc..035d107e2 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBUtils.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/DBUtils.java @@ -453,7 +453,7 @@ public class DBUtils { public long m_rowid; private ArrayList m_means; private ArrayList m_targets; - private ArrayList m_timestamps; + private ArrayList m_timestamps; private int m_cachedCount = 0; @Override @@ -476,10 +476,10 @@ public class DBUtils { m_rowid = rowID; m_means = new ArrayList(); m_targets = new ArrayList(); - m_timestamps = new ArrayList(); + m_timestamps = new ArrayList(); } - private void addEntry( InviteMeans means, String target, Timestamp ts ) + private void addEntry( InviteMeans means, String target, Date ts ) { m_means.add( means ); m_targets.add( target ); @@ -586,7 +586,10 @@ public class DBUtils { { SentInvitesInfo result = new SentInvitesInfo( rowid ); - String[] columns = { DBHelper.MEANS, DBHelper.TIMESTAMP, DBHelper.TARGET }; + String[] columns = { DBHelper.MEANS, DBHelper.TARGET, + " (strftime('%s', " + DBHelper.TIMESTAMP + + ") * 1000) AS " + DBHelper.TIMESTAMP, + }; String selection = String.format( "%s = %d", DBHelper.ROW, rowid ); String orderBy = DBHelper.TIMESTAMP + " DESC"; @@ -600,7 +603,7 @@ public class DBUtils { while ( cursor.moveToNext() ) { InviteMeans means = InviteMeans.values()[cursor.getInt( indxMns )]; - Timestamp ts = Timestamp.valueOf(cursor.getString(indxTS)); + Date ts = new Date(cursor.getLong(indxTS)); String target = cursor.getString( indxTrgt ); result.addEntry( means, target, ts ); }