1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-10 07:31:34 +02:00
Commit Graph

110 Commits

Author SHA1 Message Date
Felix Konstantin Maurer
254afafa3e First try at periodic db export 2018-01-09 22:41:27 +01:00
License Bot
a10fc8ad4e Update license headers 2017-09-12 12:39:15 +02:00
protomors
b66b33239d Added database migration. 2017-09-10 14:45:09 +02:00
Andreas Shimokawa
67f035accf DBHelper: no not update device attributes in db if we call getDevice() on a disconnected device
Fixes NPE
2017-04-16 19:43:53 +02:00
License Bot
e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
Andreas Shimokawa
08080b02bb Drop support for legacy (pre 0.12.0) database 2017-02-23 22:44:44 +01:00
Andreas Shimokawa
17b581022b optimize imports 2016-12-09 20:14:17 +01:00
Andreas Shimokawa
109a032f1e Pebble: fix Pebble LE address not being propery added to device attributes 2016-11-27 22:45:57 +01:00
Andreas Shimokawa
fa8df9f552 add missing migration script 2016-11-27 10:52:43 +01:00
Andreas Shimokawa
24752d3455 Pebble: try harder to get LE address into the database, does not work 2016-11-27 10:10:50 +01:00
cpfeiffer
9bebf1d32f When memory is really low, free up some memory #436
(although we probably can't save much)
2016-11-24 21:15:27 +01:00
Andreas Shimokawa
d41848014b fix database schema migration from 13 to 14 2016-11-16 11:37:36 +01:00
Andreas Shimokawa
163a7bdf15 Pebble 2: save heart rate values to database (hopefully) 2016-11-15 23:21:13 +01:00
JohnnySun
53d4681763 Optimize Imports 2016-09-13 23:53:35 +08:00
Andreas Shimokawa
56c7b6b1cb fix sleep goal and step goal not being set in database (should fix user attribute table spamming) 2016-09-11 12:35:26 +02:00
Andreas Shimokawa
0cc95bd297 more debug 2016-09-11 12:23:36 +02:00
cpfeiffer
d011c437a2 This hopefully fixes the recreation of the old activity db
(I cannot reproduce or test it)
2016-09-06 21:54:03 +02:00
cpfeiffer
f2b344349f Make some primary and foreign keys not-nullable 2016-09-06 00:00:48 +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
cd535a0a45 Include known devices from the database in CC
(as long as device-support is still available)
Fixes non-paired devices not being displayed
2016-08-31 00:33:54 +02:00
cpfeiffer
eb7771c1a9 Support for overlapping ActivityDescriptions + testcases 2016-08-28 00:22:34 +02:00
cpfeiffer
39c7762416 Update the device in case it has changed 2016-08-27 23:25:37 +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
8d6e6c8675 Upon request, delete not only the old, but also the new database 2016-08-27 22:51:00 +02:00
cpfeiffer
ae2df2580c Remove/document deprecated stuff 2016-08-27 22:45:27 +02:00
cpfeiffer
e139840fee More appropriate user handling: update the user instead of creating new 2016-08-27 22:34:30 +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
69f73467ea Store not only device type, but also the model in the db 2016-08-26 21:16:01 +02:00
cpfeiffer
38c4be4379 Remove isEqual() in favor of Objects.equals() 2016-08-24 23:14:25 +02:00
Daniele Gobbetti
b617ba7264 Fix the logic regarding the last sample of a run. Remove the unneded try-catch block and reuse the current DB session instead. 2016-08-21 17:38:07 +02:00
Andreas Shimokawa
0ae9955a6f Display Toast when trying to import old Misfit data (unsupported)
... and update TODO
2016-08-20 21:38:39 +02:00
Daniele Gobbetti
6119f3501a Import the old samples and map the ranges to overlays for pebble. 2016-08-19 21:09:32 +02:00
cpfeiffer
deeaa87df7 Batch the import of old activity samples to save memory during import 2016-08-18 20:51:15 +02:00
cpfeiffer
6e98defe94 Only import old activity data once per device, not for every provider 2016-08-18 20:29:20 +02:00
cpfeiffer
26d490ffd6 Store the DeviceType in the Device entity
(so that we can later recreate a GBDevice from a Device)
2016-08-17 00:34:19 +02:00
cpfeiffer
7c060506cf Invalidate UserAttributes and DeviceAttributes when new ones are created 2016-08-13 00:52:35 +02:00
cpfeiffer
b3984a409c Fix checking for up-to-date User and Device attributes 2016-08-13 00:27:38 +02:00
Andreas Shimokawa
eabe625c47 rename some classes, remove obsolete ones 2016-07-30 23:22:27 +02:00
cpfeiffer
493444a2a0 Remove unused stuff 2016-07-28 22:28:29 +02:00
cpfeiffer
b22111df9d Fix field ordering of ActivitySample (c'tor!) and improve importer #206 2016-07-28 22:12:20 +02:00
Andreas Shimokawa
8ea29e6e1d Refactor database / sample access (#206)
We now have separate tables for each provider's samples but a common interface.
2016-07-27 23:34:13 +02:00
cpfeiffer
e70a2290c3 sampleproviders now return device specific data #206 2016-06-27 20:43:48 +02:00
cpfeiffer
0596c80381 Some migration fixes
especially: add unique index on samples using timestamp and device id
(since composite primary keys are not fully supported yet)
2016-06-19 00:40:51 +02:00
cpfeiffer
233a6155cc Add class DeviceManager that provides access to the list of managed devices
Basically moved code out of ControlCenter to a separate class. Also provides
change events when the device list has changed, or changes to the device
state have occurred.
2016-06-18 23:35:34 +02:00
cpfeiffer
41e6833b2d Getting closer... db migration almost works. 2016-06-18 01:26:36 +02:00
cpfeiffer
13959677af More WIP for intrgrating old activity db into new one
(one demand to keep user in control)
2016-06-17 00:07:50 +02:00
cpfeiffer
687beee501 Migration work 2016-06-16 21:54:53 +02:00
cpfeiffer
61957d6cb0 WIP: more db work 2016-06-14 20:13:08 +02:00