1
0
mirror of https://github.com/etesync/android synced 2024-11-18 06:08:08 +00:00
Commit Graph

763 Commits

Author SHA1 Message Date
Tal Hacohen
56aba7c669 Extract ResultFragment from ImportFragment 2017-04-03 14:27:25 +03:00
Tal Hacohen
a7c5ccadc9 Import - Change toolbar title according to relevant fragment 2017-04-03 14:27:24 +03:00
Tal Hacohen
1629ffba9f Import - Add fragment to import all contacts from account 2017-04-03 14:27:23 +03:00
Tal Hacohen
7cac473c74 Import - Split ImportActivity to fragments and activity 2017-04-02 14:04:14 +03:00
Tal Hacohen
33a310344b Import - Add all events to selected calendar 2017-03-30 16:09:22 +03:00
Tal Hacohen
594c401038 Import - Show calendars in expandable list view 2017-03-30 16:09:22 +03:00
Tal Hacohen
466870ff50 Import - Add basic import activity 2017-03-30 16:09:22 +03:00
Tal Hacohen
2261d6e385 Import calendar: Add calendar account class.
CalendarAccount loads all different accounts and their calendar lists.
2017-03-30 10:10:32 +03:00
Tom Hacohen
cd5e5487a8 JournalManager: make IntegrityException inherit from GeneralSecurityException. 2017-03-29 18:27:50 +01:00
Tom Hacohen
cf805d4e72 JournalManager: add version info to Journals and use it in crypto
The crypto class now behaves differently depending on the version of the
journal.
The current difference is in the key derivation, and that the new
version of the crypto also hmacs the version automatically whenever it
hmacs anything.

The versioning was added for better future-proofing of the code.
The derivation change was done because before we were creating the same
password for all of the journals, now we do it per-journal. This means
that we can, if needed in the future use this password as the journal
password when sharing journals without compromising the security of the
rest of the journals.
2017-03-29 18:27:39 +01:00
Tom Hacohen
7357447786 Collectioninfo: fix typo in ToString field exclusion. 2017-03-29 15:10:52 +01:00
Tom Hacohen
c3e30138dd Syncmanager: get a collection info for all sync managers. 2017-03-29 14:47:43 +01:00
Tom Hacohen
01add874dc Remove unneeded fixme. 2017-03-29 13:27:56 +01:00
Tom Hacohen
d2eaf5f434 Use the new CryptoManager instead of the main encryption password.
This will give us more flexibility in the future because now the
encryption key and derivation is all managed in one place.
2017-03-29 13:01:04 +01:00
Tom Hacohen
4004eca762 Syncmanager: use the journalId as the unique collection id. 2017-03-29 12:45:14 +01:00
Tom Hacohen
1e6fc5a9cb Crypto: rename Cipher to CryptoManager. 2017-03-29 12:35:44 +01:00
Tom Hacohen
abd13d4d3d Crypto: refactor the Cipher class.
Include the hmac in the cipher class.
Derive keys on class creation instead of on encrypt/decrypt.
2017-03-29 12:27:22 +01:00
Tom Hacohen
0fbee1ea02 JournalManager: rename Helpers to Crypto.
These are crypto helpers, this should have been named this way from the start.
2017-03-29 12:12:35 +01:00
Tom Hacohen
225d01c143 Crypto: Only create random generator as needed. 2017-03-29 12:02:13 +01:00
Tom Hacohen
93f757be3e Update changelog. 2017-03-28 17:01:18 +01:00
Tom Hacohen
de834915be Bump version. 2017-03-28 16:49:26 +01:00
Tom Hacohen
1d87de2e7a App update: set the app version on first launch if not already set.
The app update broadcast receiver is only called on the first update,
not install, which was causing EteSync to think it was updating from
version 1 on the first update, doesn't matter which version one was
updating from.
This fixes it by saving the version on the first run.
2017-03-28 16:44:53 +01:00
Tom Hacohen
784070c27c SyncManager: add remote entries to cache only after they've been processed
Before this change we were adding them to cache before they were
processed, potentially persisting malformed entries, or entries we
haven't yet processed causing issues if sync was aborted before an entry
was fully processed.
2017-03-27 16:08:45 +01:00
Tom Hacohen
987076d95e Webview: fix behaviour of toolbar back button and simplify. 2017-03-24 19:15:57 +00:00
Tom Hacohen
3a83cf8303 Collection deletion: mark as deleted in cache, but don't actually delete.
This is important for protecting against potential data loss.
2017-03-24 18:55:12 +00:00
Tom Hacohen
ba9f217d66 Webview: also open tos and about from within the app. 2017-03-24 18:42:28 +00:00
Tom Hacohen
e8210e7611 Update changelog. 2017-03-24 16:19:46 +00:00
Tom Hacohen
9ba84109b2 Login: add a "forgot password" link. 2017-03-24 16:11:24 +00:00
Tom Hacohen
d21a498925 Webview: improve whitelist, and include all of the "accounts/" subpath. 2017-03-24 16:09:19 +00:00
Tom Hacohen
e7694924b4 Automatically fix non-dirty entries with null etag on upgrade
Commit 5d1c90dcba fixed a bug where
entries added from the server were marked as "local only" (null etag)
which was causing issues. That commit fixes it for newly added resources,
but existing resources remained broken.

This commit goes through the database and fixes all of the existing
broken resources. It skips dirty entries because figuring out if they
were just created or updated is complex, and the chances of doing an
update at exactly the same time there are dirty entries is quite low,
so the complexity involved is just not worth it.
2017-03-24 15:33:07 +00:00
Tom Hacohen
7562a7a76b ViewCollection: use the new LocalCalendar.findByName to get calendar. 2017-03-24 14:52:27 +00:00
Tom Hacohen
19ceab96b0 Bump version. 2017-03-24 14:48:00 +00:00
Tom Hacohen
5d1c90dcba Resource: set eTag when creating a new one from server.
Before this commit we would create new entries from the server without
an etag, essentially marking them as "local only". While the actual
value of the eTag is not currently used, null or not matters.
Because the resources were "local only", we would get weird behaviours
like having an "ADD" action when changing a resource.
2017-03-24 14:40:29 +00:00
Tom Hacohen
84244330b7 Always log deletes, even when not previously added to server.
Before this change we would only add "deletes" to the server when the
resource has been previously uploaded. This means that if a resource has
been created and then deleted before a sync, it would not be saved,
which is essentially data-loss.
This commit fixes it, so we always upload a delete entry.
2017-03-24 14:08:57 +00:00
Tom Hacohen
99fe3457fc Refresh ViewCollectionActivity when edited/deleted
Until now we were just closing it when opening a view that can cause a
change. This is nicer.
2017-03-24 13:57:25 +00:00
Tom Hacohen
0cd57851ad Journal model: call the postLoad callback on fetch too.
It's really annoying that it doesn't do it automatically as it should,
in the meanwhile, add this workaround.

I reported it to upstream:
https://github.com/requery/requery/issues/487
2017-03-24 13:57:25 +00:00
Tom Hacohen
415d5d5447 Clear journal cache on account deletion (fix account re-add issue)
Clearing the cache is a good idea regardless, though because of the
unique constraints in the cache on the journal name, this was causing
issues when deleting an account and then adding it back.
2017-03-24 13:57:25 +00:00
Tom Hacohen
f984b76ec6 Add import from vCard (vcf)/iCal (ics)
This commit adds a basic UI for importing contacts and calendars from a
file.
2017-03-24 13:57:25 +00:00
Tom Hacohen
24b170a170 View collection activity: only create fragment on first load. 2017-03-24 12:49:19 +00:00
Tom Hacohen
231684e0d4 Local event/contact: Add a way to add/update as dirty 2017-03-24 12:49:11 +00:00
Tom Hacohen
d98d58360e LocalCalendar: Add a function to get calendar by name. 2017-03-23 16:42:54 +00:00
Tom Hacohen
ec39aceb1a Mark CollectionInfo id as deprecated.
This is now implemented in the ORM and not the collection info itself.
2017-03-23 15:38:08 +00:00
Tom Hacohen
e9428c6ec7 Sync manager: Fix log messages to be the state strings and not int ids. 2017-03-12 17:08:03 +00:00
Tom Hacohen
4603cc960e Update changelog. 2017-03-10 18:16:13 +00:00
Tom Hacohen
7afb086c76 Debug activity: Show the number of entries per journal. 2017-03-10 17:15:09 +00:00
Tom Hacohen
ced3d7283d Remove change journal from main page. 2017-03-10 17:15:09 +00:00
Tom Hacohen
b0b5891e40 Add a collection view activity and move the journal viewer there 2017-03-10 17:15:09 +00:00
Tom Hacohen
3d217f47af Webview: Only load pages from a whilelist, not all.
This was causing issues with the dashboard page because of stripe.
The best mitigation at the moment, is to only load pages from a whitelist.
2017-03-10 14:38:08 +00:00
Tom Hacohen
e4043642db Suppress XSS warning.
We are only loading external websites, no use controlled data.
2017-03-10 14:36:53 +00:00
Tom Hacohen
838cc2a79d Merge contacts/calendars collection handling
This also removes the "stats" from the edit collection screen.
2017-03-10 14:19:17 +00:00