Commit Graph

73 Commits (373e96ca300b0ee77a7e22e2868850f09db9543f)

Author SHA1 Message Date
Andreas Shimokawa 3644d5e7a6 Pebble: remove notifications when dismissed on the phone (#326)
Most of the code is generic, so it could be implemented by other devices.
I dont know what happens if multiple messages arrive in the same notification.
So, this is experimental.
2017-01-09 16:33:00 +01:00
cpfeiffer 96203f574f Tiny test for GattCharacteristic class 2017-01-08 21:37:43 +01:00
Andreas Shimokawa 82c0f35c58 Pebble: add encodeUpadteWeather() to AppMessageHandler for easier watchface support
Now in Timestyle weather is in sync with what we get from weather notification
2016-12-31 18:56:24 +01:00
Andreas Shimokawa 19c5cbfbb9 fix tests 2016-12-31 18:13:04 +01:00
cpfeiffer 375aa491d4 Another build fix 2016-12-15 21:06:17 +01:00
cpfeiffer c69889d177 Simplified + fixed ArrayUtils.equals() + added lots of testcases 2016-12-11 23:30:20 +01:00
cpfeiffer eb8129f62e Remove outdated comment 2016-12-11 23:30:20 +01:00
cpfeiffer 6dfc895303 Mi2: Initial work on firmware update #427 2016-12-11 02:11:58 +01:00
Uwe Hermann 0746aaa579 app: Random typo and consistency fixes. 2016-12-01 20:22:12 +01:00
cpfeiffer a8a7d8db31 Mi2: WIP synchronize only new data since last sync
(#323)
2016-11-22 00:05:41 +01:00
cpfeiffer d89899557c Mi2: Add config option to configure date/time display
(added a new EventHandler method to set a specific configuration option)
2016-11-13 20:47:24 +01:00
cpfeiffer d442030c2a Revert to robolectric 3.1.2 as 3.1.3 does not work at all. 2016-10-29 15:55:27 +02:00
cpfeiffer 713989ef38 Add event "test new function" for the debug screen 2016-10-11 23:06:59 +02:00
Andreas Shimokawa 6a18d90fee Vibratissimo: add simple and buggy activity with a slider for vibration control
Also includes some fixes and "find your device" support ;)
2016-09-20 20:28:52 +02:00
JohnnySun 53d4681763 Optimize Imports 2016-09-13 23:53:35 +08:00
cpfeiffer bfffd64b65 Even more service testcase cleanup 2016-09-10 11:22:26 +02:00
cpfeiffer c31049839a Make DeviceCommunicationServiceTestCase runnable with robolectric
- enables the test for travis
- tests operation when not connected
- tests connecting
- tests operation when connected
2016-09-10 11:12:51 +02:00
cpfeiffer cd84b891d9 micro cleanup 2016-09-05 00:17:34 +02:00
cpfeiffer ce175c2952 Test SampleProvider (MiBand for a start) 2016-09-05 00:10:38 +02:00
cpfeiffer 2e91246a45 Make sure that every Test class has at least one @Test method, or is abstract 2016-09-04 22:52:55 +02:00
cpfeiffer 2c27f30575 Some testcase infra 2016-09-04 22:10:35 +02:00
cpfeiffer 8e154ca67d slightly more testing of Device/Attributes 2016-09-03 21:16:45 +02:00
cpfeiffer 6f02f9e350 Unit-Test and fix *Attributes sort order
When adding e.g. new DeviceAttributes, we cannot simply add them to the
attributes list, because that list is supposed to be ordered. We could
insert it at the beginning, but that would be brittle to changes in the
GBDaoGenerator, so we simply re-fetch them from the db after adding
new attributes.
2016-09-02 00:34:30 +02:00
cpfeiffer d9283d0f22 Sigh. Fix LoggingTest on Travis
When running all tests from gradle, they are executed in a single VM,
and from a quick look it is not configurable to start LoggingTest in
a separate VM (in order to enforce fresh logback configuration).

Thus, previously started tests interfere with the custom logback
configuration of LoggingTest.

=> Set the logback configuration in advance in build.gradle
2016-08-30 01:25:43 +02:00
cpfeiffer bcb07ccacd Enable LoggingTest with robolectric 2016-08-29 00:26:29 +02:00
cpfeiffer eb7771c1a9 Support for overlapping ActivityDescriptions + testcases 2016-08-28 00:22:34 +02:00
cpfeiffer 1a22259b4e Good practice: use the DAO to insert/update instead of the session
(saves a few cycles to look up the correct DAO from the session)
2016-08-27 23:12:48 +02:00
cpfeiffer bfaaed7e5c Detcach samples from the session after querying, to save memory 2016-08-27 21:40:46 +02:00
cpfeiffer 350e72d534 Initial support for user-configured activity descriptions
- for a given user and time span, there may be an ActivityDescription
  - with a textual description
  - and a list of tags
- every tag has
  - a name
  - and an optional description
2016-08-27 00:25:45 +02:00
Andreas Shimokawa 34aead6c63 remove obsolte stuff 2016-08-26 23:37:17 +02:00
cpfeiffer c59553c9c9 Rename GBDevice#hardwareVersion to model
(e.g. while DeviceType is "PEBBLE" in general, the model
might specify a Pebble Time or Time Steel.
2016-08-26 20:57:59 +02:00
cpfeiffer 49b8b9ebca More robolectric stuff
- guard against multiple GBApplication.onCreate() invocations
- test DBHelper.getDevice() for a start
2016-08-25 00:00:53 +02:00
cpfeiffer bfc0b4faaf Add robolectric dependency and addd a first EntitiesTest
Use KitKat (19) as target sdk since robolectric 3.1.2/sqlite4java
does not understand "WITHOUT ROWID" tables.

Also, add constants for user's gender and document some things.
2016-08-24 22:56:42 +02:00
Andreas Shimokawa b77f3ad3bf Pebble: Implement call dismissal with canned messages
This also moved the canned replies setting to pebble settings
(we will change that if we have another device supporting this)
2016-06-24 10:25:08 +02:00
Andreas Shimokawa 98999993e5 Pebble: In AppManager allow moving apps on the device to the top (context menu) 2016-06-12 01:20:12 +02:00
Steffen Liebergeld e386d6da43 Add onSetMusicState(MusicStateSpec stateSpec)
This commit contains the infrastructure needed for the
NotificationHandler to send music state information to the device. That
is, it introduces a call onSetMusicState(MusicStateSpec stateSpec), that
in turn sets up an intent to the service, which will then call the
encodeSetMusicState() function of the device. encodeSetMusicState is
available for pebble only. There are empty stubs for other devices.
2016-06-08 20:31:48 +02:00
cpfeiffer cb4dcf9fa6 Disable LoggingTest, fixes travis failures 2016-06-05 22:33:24 +02:00
cpfeiffer 50b7a02ef2 One more attempt at fixing dynamic logging reconfiguration
- moved out of GBApplication to class Logging
- the main thing is: when start()ing the FileAppender again, it *must*
- be configured to be non-lazy, otherwise it won't open the stream ever again.
2016-05-26 23:46:21 +02:00
Andreas Shimokawa cb1ec5dccb Make calendar event type byte instead of int
Now the UUID will be constructed like this:

High 64bit 0x4742474200 | type
Low 64bit id
2016-05-24 13:11:57 +02:00
Andreas Shimokawa 4bd578ebea Pebble: send sunrise/sunset to watch for today and tomorrow, also delete previous timeline pins 2016-05-16 23:37:40 +02:00
Andreas Shimokawa 017f650b3f Pebble: send sunrine and sunset pins to timeline when setting time in debug menu
This is just a test and it will leak your timeline data, since we never delete it.
Also this adds some rough infrastructure for calendar events.
2016-05-16 17:30:11 +02:00
cpfeiffer 10d7274aa1 Fix testcases (all this should be scrapped and redone with e.g. robolectric) 2016-04-29 21:58:08 +02:00
cpfeiffer f15a97d994 Initial live heartrate measurement in the live activity tab #178 2016-04-12 23:12:50 +02:00
Andreas Shimokawa a15b327ff1 Refactoring: get rid of ServiceCommand, use new CallSpec and MusicSpec to pass Call and Music info 2016-04-04 20:08:34 +02:00
cpfeiffer b129844169 Small fixes to PR 273 #232
- dynamically toggle hr sleep support when preference changes
- check hr support dynaically after device info is available to avoid false error message
2016-04-03 22:38:06 +02:00
Andreas Shimokawa adfef3db42 Prepare code for more music metadata (duration, track count, current track number)
Oh and format code
2016-03-27 17:45:44 +02:00
cpfeiffer a70c31f965 Add commandline for running all firmware tests 2016-03-26 00:10:32 +01:00
cpfeiffer 8165751e57 Refactoring to test the double firmware update procedure #234
(while performing the same, known to be working firmware update for Mi1A)

Result: double firmware update procedure works on Mi1A.

Also updated FirmwareTest. Perform all tests not only in the test itself,
but also at runtime before doing the actual update.

Further:
- fix setting of firmwareInfoSent state variable, which prevented installation
  of the section firmware
- make one string translatable
2016-03-25 23:45:27 +01:00
cpfeiffer b419c93254 Disable the test for travis again 2016-03-21 23:44:58 +01:00
cpfeiffer 424d9cd142 More work on firmware detection, recognition and validation #234
Should be as robust as possible now.
2016-03-21 23:42:34 +01:00