Commit Graph
100 Commits
Author SHA1 Message Date
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
cpfeiffer f4e955dbe0 Updated changelog for 0.18.0 2017-03-15 23:42:30 +01:00
cpfeiffer d408be5ec8 Mi2: make text/icon notifications confiurable and version dependent 2017-03-15 00:26:39 +01:00
cpfeiffer cf35e84feb Mi2: add hint about font installation for text notifications 2017-03-14 23:54:56 +01:00
cpfeiffer 5d96df3508 Mi2: add hint about intermediate firmware 1.0.0.53 2017-03-14 23:45:30 +01:00
cpfeiffer 2d60beea1f Mi2: added some more tested firmware/font versions 2017-03-14 22:59:48 +01:00
cpfeiffer e62a860ee6 Avoid potential NPE when neither name nor number are available 2017-03-14 22:03:30 +01:00
cpfeiffer 17ecee0cab Mi2: initial support for text notifications and icons
See #560
2017-03-14 00:45:54 +01:00
cpfeiffer 8fc6dfeca7 Improved AlertNotificationProfile
AlertLevel, AlertCategory, Control Point
2017-03-14 00:45:54 +01:00
cpfeiffer 4b230412b6 Some utility methods + tests 2017-03-14 00:45:54 +01:00
cpfeiffer 6282597790 Handle BT issues with discovered characteristics
It occurred to me that onServicesDiscovered() was called multiple times
whenever I connected to my Mi Band 2. Either the band actually sent the
characteristics in multiple chunks or Android itself notified multiple
times.

So we gracefully handle this by
- updating the list of characteristics
- *not* initializing the device again when it *is* already initialized
or at least initializing.
2017-03-09 22:49:13 +01:00
cpfeiffer 9411f80440 Mi2: support for updating firmware fonts (*.ft, *.ft.en)
This is related to #560, but alas is not sufficient for enabling text
notifications.
2017-03-07 23:26:41 +01:00
cpfeiffer 2b17d7fb14 More cleanup 2017-03-07 00:06:35 +01:00
cpfeiffer 31e0e9a5f7 Mi2: More internal cleanup from initial Mi1 copy&paste 2017-03-05 21:45:39 +01:00
cpfeiffer f6bee00582 Mi2: some internal cleanups/renamings 2017-03-05 21:27:47 +01:00
cpfeiffer 0b45fe63f0 Fix up the testcases
Please check if transliteration of Hebrew in LnaguageUtilsTest is
correct. It works just fine if you follow the mapping in LanguageUtils.

Test all transliteration in LanguageUtils only, the test in
DeviceCommunicationServiceTest does not need to be done for every
language.

Also use assertEquals(expected, value) instead of assertTrue(expected.equals(value));
2017-03-05 19:44:31 +01:00
cpfeiffer 09d4f81ce8 Update dependencies 2017-03-05 19:44:16 +01:00
cpfeiffer 4ecd4b6896 Add hint about privacy guard crashing your phone during discovery 2017-03-05 19:18:40 +01:00
cpfeiffer 94744677c9 Improve discovery hint re Privacy Guard crash 2017-03-05 16:30:31 +01:00
cpfeiffer c56b655b48 Mi2: send text notification for mi2 only, not mi1a 2017-03-05 10:43:19 +01:00