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

1065 Commits

Author SHA1 Message Date
Tom Hacohen
2b0b35c9be Service test: inviting owner to a journal is no longer allowed.
This is a new validation on the server, so this hack we did is no longer
possible.
2017-05-12 14:48:19 +01:00
Tom Hacohen
f7104bbcef Syncmanager: fetch journal entries in chunks.
Before this commit we used to fetch the whole journal entry list in one
go, which caused issues in two cases:
1. On slow internet connections the download may fail.
2. With big journals: Android interrupts sync managers if they don't
    perform any significant network traffic for over a minute[1],
    and because we would first download and only then process, we would
    sometimes hit this threshold.

Current chunk size is set to 50.

1: https://developer.android.com/reference/android/content/AbstractThreadedSyncAdapter.html
2017-05-12 14:36:43 +01:00
Tom Hacohen
4e2667cdb2 Update Changelog. 2017-05-12 13:09:44 +01:00
Tom Hacohen
c19e7b0ecb Bump version. 2017-05-12 12:46:32 +01:00
Tom Hacohen
9cdd63f1d9 Journal manager crypto: change RSA key length to 3072.
I set it to 2048 following the NIST recommendations[1] which said it was
OK, but actually, as pointed out by Dominik Schürmann, it's probably a
better idea to set to 3072.

Users who already have a 2048 key pair won't be affected, while users
who don't will have a 3072 key created for them. Users with different
key lengths can interact with each other without any issues.

1: https://www.keylength.com/en/4/
2017-05-12 12:42:35 +01:00
Tom Hacohen
b33e5003d4 Setup Encryption: use the more reliable AsyncTask over AsyncTaskLoader.
I had issues with not being able to add accounts in some cases.
2017-05-12 12:38:08 +01:00
Tom Hacohen
660d5b94ba Journal item activity: improve look (add elevation to contact name). 2017-05-12 11:31:25 +01:00
Tom Hacohen
0503efa8ac Journal item activity: Use string resources instead of hardcoded strings. 2017-05-12 11:26:57 +01:00
Tom Hacohen
9f069692c9 Journal viewer: Improve the look and feel of the journal viewer
This includes using icons instead of text for the journal list, and
showing events and contacts in a prettier way.
2017-05-11 22:43:29 +01:00
Tom Hacohen
c3ee3aac22 Journal item: Implement showing contacts.
This shows address book journal items in a nicer way.
2017-05-11 22:42:59 +01:00
Tom Hacohen
b964b8dfe1 Journal item: implement showing calendar events (based on etar)
This shows the calendar events in a nicer way based on Etar[1] which is
in turn based on the AOSP calendar.

1: https://github.com/Etar-Group/Etar-Calendar/
2017-05-11 22:42:59 +01:00
Tom Hacohen
7dba220d06 Journal item activity: create the infrastructure for a nicer interface 2017-05-11 22:42:59 +01:00
Tom Hacohen
e6ba52074a Journal item: view journal item in a separate activity.
This change makes clicking on journal items in the list to show in a
separate activity. At the moment it just makes for a slightly nicer
presentation. In the future we would change it to show the data in a
nice formatted way instead of a raw dump of the vObject.
2017-05-11 22:42:59 +01:00
Tom Hacohen
889eede699 Journal list: Use icons for actions instead of text. 2017-05-11 22:42:59 +01:00
Tom Hacohen
a3e4fc48ab Collection header: set owner visibility to gone when there's no owner. 2017-05-11 22:42:37 +01:00
Tom Hacohen
1cf1d0f5b0 BaseActivity: Add an activity that all other activities inherit from.
Now that we have this activity, remove the duplication of onResume/onPause and
onOptionsItemSelected.
2017-05-11 22:42:36 +01:00
Tom Hacohen
d86edd7688 Journal model: add a unique constraint to journal UIDs.
Journals and services should be unique together, this wasn't there
because of an issue with requery that should now be resolved.
2017-05-05 16:50:54 +01:00
Tom Hacohen
df05dd2498 Deps: upgrade requery to 1.3.1.
This fixes an issue with index creation when altering tables.
2017-05-05 16:49:27 +01:00
Tom Hacohen
5d816b991e Update Changelog. 2017-05-04 11:26:08 +01:00
Tom Hacohen
10095bd4ee WebView: correctly handle checking if a url should open in app or browser.
There was an issue that for the first load it would only check the url
after a redirect (if there is one), which meant that for example,
the dashboard, would open in app because you'd be redirected to the
login page.
2017-05-03 19:25:39 +01:00
Tom Hacohen
a9eba1af4e Account upgrade: raise an error when account migration fails.
Account migration works in most cases, though while testing I managed to
get it to fail in some rare occasions. This commit adds a check to
verify the number of contacts we thought we migrated is equal to the
number of contacts we have after migration.

If the check fails, it presents the user with a notification that opens
the relevant FAQ entry on the EteSync website.
2017-05-03 19:04:42 +01:00
Tom Hacohen
20568c850a SyncManager: Request for a full sync if interrupted.
This doesn't work well, but I'm keeping it since it's still better than
what was there before.

We have a problem that on initial sync with long enough logs, Android
kills the sync manager before completion. The reason for that is that
due to the fact that EteSync first downloads the whole journal and only then
processes it, the sync manager spends a minute without making any
network traffic, which in turn makes Android kill the sync[1].

This should probably be fixed by paginating the initial download, that
is, downloading and processing the journal in chunks, which is possibly
a good idea regardless.

1: https://developer.android.com/reference/android/content/AbstractThreadedSyncAdapter.html
2017-05-03 19:04:42 +01:00
Tom Hacohen
a107cd3fa2 AccountSettings: remove wrong version set.
This was a leftover from the cherry-pick from DAVdroid. The version is
set outside of this function, so this was redundant, and wrong.
2017-05-03 19:04:07 +01:00
Ricki Hirner
643e2b23ea Use UUIDs for newly generated event/task UIDs (RFC 7986 5.3 UID Property) 2017-05-02 11:35:52 +01:00
Tom Hacohen
f819dbf33f Bump version. 2017-04-27 13:02:53 +01:00
Tom Hacohen
eb95eada91 Import: Add an alias for our addressbook and davdroid account types. 2017-04-27 11:56:19 +01:00
Tom Hacohen
861d5e4b4e Fix account type and authority to use function and not string. 2017-04-27 11:56:18 +01:00
Tom Hacohen
26c0a62dc4 Don't crash when immediately entering collection after creation. 2017-04-27 11:56:17 +01:00
Tom Hacohen
eae4e14b1d Merge: add support for multiple address books
Android allows only having one address book per account, so until now
users of EteSync were only able to have one address book. This was
always an annoying limitation, but even more so now that journal sharing
is implemented.

Luckily, DAVdroid recently implemented multiple account support by
creating sub-accounts for address books.

This merge is based on the changes done in DAVdroid but was heavily
adjusted for EteSync.
2017-04-27 11:54:46 +01:00
Tom Hacohen
674ea1eeca Workaround Android account creation issue (ignoring userData)
It seems like there's an issue with Android that sometimes the userData
passed to addAccountExplicitly is not correctly set in the Android cache
making it return null on subsequent fetches. It doesn't always happen
because some cases clear the cache, however I can consistently trigger
it by creating and deleting an account a few times in a row.
2017-04-27 11:49:06 +01:00
Tom Hacohen
db82757bc4 Show an error message when failing to create an account. 2017-04-27 11:49:05 +01:00
Tom Hacohen
aeae7de077 Workaround: ignore invalid account errors when syncing contacts
This is an ugly workaround. For some reason a sync is called when an
account is removed. Since the main account is removed, we get an invalid
account exception when trying to fetch it.

Need to find out why a sync is even triggered and just remove it there.
2017-04-27 11:49:05 +01:00
Tom Hacohen
c81ba0cddb Create an AndroidCompat class to wrap around Android oddities.
As part of it, move removeAccount to that class.
2017-04-27 11:49:05 +01:00
Tom Hacohen
de6a124bf2 Remove unnecessary InvalidAccountException
Based on commit d4e386441091ae3a84382f2088dfad03ea80c666 from DAVdroid.
2017-04-27 11:49:05 +01:00
Tom Hacohen
068e0c6b4d Expose appName from App and use it. 2017-04-27 11:49:05 +01:00
Ricki Hirner
51840c3a22 Fix some inconsistencies 2017-04-27 11:49:05 +01:00
Ricki Hirner
138d344a5b Open DAVdroid main activity when add a "DAVdroid Address book" account is added over Settings 2017-04-27 11:49:05 +01:00
Tom Hacohen
d6ace869fe Remove add, share and delete restrictions on address books
Now that we have multiple address books support, we can share and delete
address books like we did calendars.
2017-04-27 11:49:05 +01:00
Tom Hacohen
2f95ddbda2 Import: Fix address book import.
The import code assumed there can be only one address book, and that
it's the main one. This commit fixes that wrong assumption.
2017-04-27 11:48:01 +01:00
Tom Hacohen
e729bcff42 ViewCollection: fix addressbook stats. 2017-04-27 11:48:01 +01:00
Tom Hacohen
51aecba9a0 LocalAddressBook: Add a way to get address book by UID. 2017-04-27 11:48:01 +01:00
Tom Hacohen
19b955f981 Change LocalAddressBook to look like LocalCalendar (accept journalentity) 2017-04-27 11:48:01 +01:00
Tom Hacohen
48a77530a8 Make account type strings non-translateable. 2017-04-27 11:48:01 +01:00
Tom Hacohen
dfb8981752 Remove the ACCOUNT_TYPE constant (now a string resource)
This corresponds to commit 41dae8bcb3335b9e77d9e73b33e9bb14f8900af9 from
DAVdroid, but was done manually.
2017-04-27 11:48:01 +01:00
Ricki Hirner
0d7e2362b3 Improve address book details in debug info 2017-04-27 11:48:01 +01:00
Ricki Hirner
310b94e280 Add more debug information
* power saving status
* permissions
* address book accounts
2017-04-27 11:48:01 +01:00
Tom Hacohen
1422d95ccf Disallow user removal of address book accounts
We don't want users to remove address books on their own, we want to
control these automatically. This commit blocks it.
2017-04-27 11:48:01 +01:00
Tom Hacohen
83ef63e94b Remove getCollections and add the afterLoad workaround to getJournals. 2017-04-27 11:48:01 +01:00
Tom Hacohen
589f81c50d Add multiple address books support
Android allows only having one address book per account, so until now
users of EteSync were only able to have one address book. This was
always an annoying limitation, but even more so now that journal sharing
is implemented.

Luckily, DAVdroid recently implemented multiple account support by
creating sub-accounts for address books.

This patch is an import of the DAVdroid changes, with adjustments to
work with EteSync, and a few changes that did not make sense for
EteSync. The original commits' split didn't provide any value over this
squash, and the amount of adjustments and addition needed to be done to
apply them, made me decide to squash this change together.

This commit is mostly based on:
dfec72ce6b8ff5e0780e9ac4418c81d080f4b60b
9817594da14ad8dffae18de386e14aeaf41312b9
2017-04-27 11:42:05 +01:00
Tom Hacohen
2e25c44d78 Journalmanager crypto: Make AsymmetricKeyPair serializable.
This should fix a rare crash on the login page.
2017-04-26 19:47:32 +01:00