Commit Graph
100 Commits
Author SHA1 Message Date
cpfeiffer 78b50e82fa Fix crash in settings activity with export location
The way this works will never be a fully working solution, because uris are
*not supposed* to be resolved to a filesystem path. So while this may work
right now, it will most probably fail in the future, with other content providers.

See e.g. https://github.com/iPaulPro/aFileChooser/issues where this code originally came from
(via Stackoverflow).

We won't crash anymore, but we won't support certain content providers. In the long run, we
should search for the proper solution.

Closes #982
2018-02-11 14:32:21 +01:00
cpfeiffer 560f1705f4 An attempt at workarounding mpandroidchart crashes #960 2018-02-03 01:08:25 +01:00
cpfeiffer b0ffd2c279 Mention font installation for Mi Band 2
Fixes #967
2018-02-01 23:50:17 +01:00
cpfeiffer d3f3cefaf8 Update changelog for mpandroidchart fixes 2018-01-14 22:27:26 +01:00
cpfeiffer dd670ef783 Update changelog for bgjs crash fix 2018-01-14 21:24:13 +01:00
cpfeiffer fa0fd250cf Attempt to fix crash with ExternalPebbleJSActivity #863 2018-01-14 01:40:04 +01:00
cpfeiffer da5d1e3685 Trying to simplify ExternalPebbleJSActivity#onCreate() a bit
(by splitting into separate methods)
2018-01-14 00:20:13 +01:00
cpfeiffer 9ee1aa87e8 Move some methods to clarify responsibilities and simplify some things 2018-01-13 21:58:40 +01:00
cpfeiffer e159a5dde3 Cleanup, deduplication, null-handling fixes 2018-01-13 21:08:51 +01:00
cpfeiffer 0e2c73e6fe As a test, use custom MPAndroidchart with fixes applied
See #917

So far, merged
PhilJay/MPAndroidChart#3232
PhilJay/MPAndroidChart#2958
PhilJay/MPAndroidChart#3145
PhilJay/MPAndroidChart#3201
PhilJay/MPAndroidChart#3321
PhilJay/MPAndroidChart#3207
PhilJay/MPAndroidChart#3384
2018-01-04 00:52:35 +01:00
cpfeiffer d570ee864d Fix logs sometimes not containing stacktraces
Fixes #916
2018-01-04 00:12:59 +01:00
cpfeiffer b9f19970df Small safety measure against null device 2018-01-04 00:12:59 +01:00
cpfeiffer fccd2ebb77 Display the actual firmware kind instead of "Firmware"
i.e. "GPS Firmware", "Watchface", "Resources", ...
2017-12-11 23:36:39 +01:00
cpfeiffer 53398e019b Make installer view scrollable 2017-12-11 22:20:36 +01:00
cpfeiffer d447829d6f Bump build:gradle to 3.0.1 2017-12-08 23:18:11 +01:00
cpfeiffer fb0a4ed738 Another attempt at fixing another issue with new tools.build gradle:3.0.0 2017-11-12 01:20:28 +01:00
cpfeiffer 7b3e929cd4 Another attempt at fixing travis build 2017-11-11 00:55:05 +01:00
cpfeiffer a839a88e40 Attempt to fix travis with new com.android.tools.build:gradle:3.0.0 2017-11-11 00:49:31 +01:00
cpfeiffer 23b18abfe8 Avoid potential NPE 2017-11-03 22:01:11 +01:00
cpfeiffer e2868f0e24 Just a FIXME for someone 2017-10-12 23:25:26 +02:00
cpfeiffer 7137387b08 Huh, travis doesn't like gradle 4.2 yet!? Trying 4.1 2017-09-28 19:17:46 +02:00
cpfeiffer ffb2f37af5 Update gradle to 4.2 2017-09-28 18:54:58 +02:00
cpfeiffer 0687564bbb Remove unused, commented out code 2017-09-28 17:31:40 +02:00
cpfeiffer 770c8a482d Bip: pass the right logger instance 2017-09-27 21:46:23 +02:00
cpfeiffer 32d5ceb78f Make update notification dismissable on error conditions
good idea, @joserebelo #821
2017-09-25 23:25:04 +02:00
cpfeiffer 976942757f Make sure we get a stacktrace in the log
(so we don't have to guess where it happened) #807
2017-09-25 23:25:04 +02:00
cpfeiffer 0fd6064ab6 Just a single method rename, to make it more clear 2017-09-25 23:00:39 +02:00
cpfeiffer 3c9fab0471 Fix fw update notification being stuck at the end
Fixes #821
2017-09-25 00:03:40 +02:00
cpfeiffer 35e59d0add Bip: WIP for ashimokawa 2017-09-17 22:36:49 +02:00
cpfeiffer e9a68e70b5 Make Mi2 FetchOperation reusable 2017-09-09 00:02:30 +02:00
cpfeiffer a93ace255b Don't crash, don't queue a transaction twice!
Fixes #794
2017-09-04 23:39:40 +02:00
cpfeiffer e44eb03698 Amazfit Bip: avoid sending weather info when not initialized 2017-09-04 23:23:51 +02:00
cpfeiffer 1ddea9268d Amazfit Bip: request GPS fw version earlier
(to avoid recreation of DeviceAttributes because fw2 is sometimes available and sometimes not.)
2017-09-04 23:19:53 +02:00
cpfeiffer f5934dfb3b Don't crash when no firmware version available yet 2017-09-03 23:56:30 +02:00
cpfeiffer 55bf9ef784 Some logging 2017-09-03 23:51:20 +02:00
cpfeiffer 24797c7dd7 Make AbstractGBActivity abstract :-) 2017-09-03 10:48:14 +02:00
cpfeiffer 962720145e Fix custom language being lost for newly created activities
So we do need to set the language both on change and onCreate()

For some reason, the title bar of the SettingsActivity is not updated on recreate().

Closes #787
2017-09-03 01:04:34 +02:00
cpfeiffer c468e7f521 Mi Bands+Bip: when an operation finishes, unset the gatt callback on the BtLEQeue
Otherwise it will continue to receive events until another transaction is being executed.
2017-09-02 22:49:58 +02:00
cpfeiffer c91e14f644 Bip: some code deduplication 2017-09-02 21:45:56 +02:00
cpfeiffer 6b1ba4d161 Don't duplicate colors, use the theme #757 2017-08-14 21:59:49 +02:00
cpfeiffer 95ce3d333e Ugly workaround for blacklist not properly persisting
Fixes #696
2017-08-01 00:10:10 +02:00
cpfeiffer 12f9386fac Also handle resetting language to default properly #733 2017-07-31 23:00:02 +02:00
cpfeiffer c1925a4e64 Properly handle and distribute language change #733
Also centralize QUIT handling in GBActivity
2017-07-31 22:49:05 +02:00
cpfeiffer 01d3a3a7be Mi Band 2: set goal notification also in phase2Initialize() 2017-07-15 21:15:42 +02:00
cpfeiffer a43a940f0c Update gradle build tools to 2.3.3 2017-07-13 23:48:13 +02:00
cpfeiffer 18926e6bbd Merge branch 'joserebelo-mi2-display-items' 2017-07-13 23:41:33 +02:00
Carsten PfeifferandGitHub 377e999067 Merge branch 'master' into mi2-display-items 2017-07-13 23:26:25 +02:00
cpfeiffer 7ee3deef38 Give HPlus some more visibility 2017-06-30 21:28:20 +02:00
cpfeiffer 4e9b85999e Unregister some listeners to avoid leaking #655 2017-05-28 00:19:24 +02:00
cpfeiffer e279cd736f Some logging for the weird blacklist issue #696 2017-05-21 21:02:23 +02:00
cpfeiffer c79eda5507 Remove "tapString" from DeviceCoordinator 2017-05-19 22:35:37 +02:00
cpfeiffer 5e079bb480 Pull out useful code from LiveviewIOThread into BtClassicIoThread 2017-05-19 22:27:50 +02:00
cpfeiffer 1d79c9d93d Dark theme: set some text colors for the speed zone tab 2017-05-18 23:26:04 +02:00
cpfeiffer db935c650d Update gradle version to 3.5 2017-05-18 20:18:10 +02:00
cpfeiffer 03d8667827 Update gradle tools version 2017-05-18 20:14:54 +02:00
cpfeiffer 07f4d3148a Also reset the last package counter when doing a second round
See #691
2017-05-15 23:11:52 +02:00
cpfeiffer e4faabeca3 Fix NPE
Closes #691
2017-05-15 19:34:33 +02:00
cpfeiffer 0e4b9a4eb8 Mi2: Keep fetch activity data until data is from today
When the fetch operation finishes successfully, double check if
the last received data is from today. If it is older, fetch again.
Closes #611
2017-05-15 00:38:26 +02:00
cpfeiffer 07c61e6bcb Revert "Revert "Enable notifications during testcases to avoid NPE starting the service""
This reverts commit 6627371f92.
2017-04-27 08:03:48 +02:00
cpfeiffer c3c5e0415d The Real Fix #666 2017-04-27 07:57:57 +02:00
cpfeiffer d8cbb18587 Revert "Ignore Test"
This reverts commit 62efd90e17.
2017-04-27 07:57:57 +02:00
cpfeiffer f1fbab7dd9 Revert "Revert "Adjust test case setup and fix failing tests""
This reverts commit b0384e90d5.
2017-04-27 07:57:57 +02:00
cpfeiffer 739b5e9c50 Enable notifications during testcases to avoid NPE starting the service 2017-04-25 22:51:56 +02:00
cpfeiffer 85511fb97f Updated translations from transifex (thanks!) 2017-04-25 22:03:55 +02:00
cpfeiffer b2a1805e4f Update changelog for 0.19.0 2017-04-25 22:02:57 +02:00
cpfeiffer d9b0d639b8 Adjust test case setup and fix failing tests
- add missing call super.setUp() in LoggingTest
- make use ofGBApplication's logger and db support instead
  of adding specific test things. Avoids differences between
  the local test things and the global GBApplication instances.
2017-04-25 21:55:06 +02:00
cpfeiffer 523055189f Some basics for testing the calendar functionality 2017-04-24 11:58:07 +02:00
cpfeiffer ed02a9781a Fix a cursor not being closed
Still won't be the cause for #655
2017-04-23 12:45:02 +02:00
cpfeiffer 9ed8004a69 Fix rare NPE 2017-04-22 23:56:04 +02:00
cpfeiffer 3f8620e026 Use toString() instead of risking a ClassCastException 2017-04-22 21:16:40 +02:00
cpfeiffer 2003d56190 Cleanup package blacklist handling
Didn't find a cause for #664, though.
2017-04-22 16:59:55 +02:00
cpfeiffer 36c1b5a6f2 Fix static context leak
I don't think this is the cause for #655, but it supposedly also breaks
instant run, so now it's fixed.
2017-04-21 22:34:47 +02:00
cpfeiffer 63c640f471 Port off of deprecated API 2017-04-21 22:30:29 +02:00
cpfeiffer 1e4351b03a Silence lint warning 2017-04-21 22:23:50 +02:00
cpfeiffer 696dc1f08d Attempt to fix reconnection not happening in some cases
Fixes #530
2017-04-20 23:01:32 +02:00
cpfeiffer b142add631 Pass a GBDevice instead of GBDeviceCandidate to getBondingStyle() #651 2017-04-17 23:00:16 +02:00
cpfeiffer 16af0724dd Replace method pair() with connectFirstTime()
Should help with #642 for hplus which did not implement pair()
2017-04-12 21:35:40 +02:00
cpfeiffer 589945f234 Use try-with-resources to ensure stream is closed on exception 2017-04-12 21:34:48 +02:00
cpfeiffer c93e97f10f Shave ~600KB off the apk size with the help of a FrankenDAO
We use a patched version of greenDAO's DaoGenerator with a bugfix
and additional support for
- composite primary keys
- WITHOUT_ROWID

We used to use jitpack for including our own greendao dependency into
Gadgetbridge. Since jitpack does not know how to build a real greenDAO
release, it will simply include all artifacts, including ftl templates
etc. which we do not need at runtime at all.

We could fix this by patching greenDAO build, but we actually don't need
to do that, since we can simply use the pristine greenDAO runtime
dependency. It will happily use our custom DAOGenerator-generated
entities.
2017-04-10 21:44:00 +02:00
cpfeiffer 1a88858c6f Fix some findbugs findings 2017-04-09 01:09:43 +02:00
cpfeiffer bb98910e1c Update gradle to 3.4.1, pmd to 5.5.5 2017-04-08 23:59:00 +02:00
cpfeiffer 39c7c1aae3 Update robolectric to 3.3.2 2017-04-08 23:42:29 +02:00
cpfeiffer 4519f35ff1 Bump up versions of some dependencies 2017-04-08 23:38:12 +02:00
cpfeiffer 4a4a1e25df Properly format the sleep goal as a duration, not as a time
Also suppress trailing zeros, e.g. display
8h instead of 8h 0m
2017-04-08 23:16:33 +02:00
cpfeiffer 2feb3bed47 Reduce animation time from 350ms to 250ms
(seemed a bit laggy to me)
2017-04-08 22:52:22 +02:00
cpfeiffer c2f83fa857 Add changelog entries 2017-04-08 22:36:51 +02:00
cpfeiffer 60ed9ca373 Remove default intent actions out of if-condition 2017-04-07 21:55:47 +02:00
cpfeiffer 202ae53d71 Ensure that a newly discovered and initialized device will be displayed
Fixed a race condition between ACTION_DEVICE_CHANGED event handlers:
- DeviceCommunicationService added the device to the database
- DeviceManager notified the views to be refreshed

When the latter happened before the former, thew new device would not
be displayed.

=> Let DeviceManager do both.
2017-04-07 21:17:37 +02:00
cpfeiffer e1797fc9f7 When connecting for the first time, set "pair" to true 2017-04-07 00:40:33 +02:00
cpfeiffer 26ff7d67e3 Remove some now useless code 2017-04-07 00:11:25 +02:00
cpfeiffer d2053b32bf Small cleanup 2017-04-06 23:58:50 +02:00
cpfeiffer 94edaa0cc1 Update build gradle dependency to 2.3.1 2017-04-06 23:57:24 +02:00
cpfeiffer 5b8624de71 Make pairing optional after discovery
See #642 which might be fixed by not pairing.
2017-04-06 23:47:35 +02:00
cpfeiffer f48729cc64 Pie Charts: some improvements wrt the labels
Still room for optimization.

Thanks to Alberto!
2017-04-05 00:08:17 +02:00
cpfeiffer f2dca649a3 Update to mpandroidchart 3.0.2 2017-04-01 23:57:12 +02:00
cpfeiffer da9742fd67 Mi1: Attempt to recognize Mi1 model with hwVersion = 8
Closes #364
2017-03-20 23:25:42 +01:00
cpfeiffer 14552a1a80 Disable live activity tracking when activity is paused
Fixes #496
2017-03-20 23:01:28 +01:00
cpfeiffer b97674ba85 Mi2: Display realtime steps in Live Activity #428
Thanks for the hint!
2017-03-20 23:01:28 +01:00
cpfeiffer cc159cf80f 0.18.2 2017-03-18 11:46:08 +01:00
cpfeiffer f1d07c83f6 Fix NPE #603 2017-03-18 11:41:47 +01:00