Commit Graph

4737 Commits

Author SHA1 Message Date
Zorica Stojchevska 2ffeee386d Revert asking for write to storage permissions below sdk 33 2023-01-27 10:15:19 +01:00
Neil Marietta 2592d5dec7 Merge branch 'feat/unauth-sessions' into 'develop'
feat: Added Unauthenticated Session support.

See merge request android/mail/proton-mail-android!1233
2023-01-26 17:55:54 +00:00
Neil Marietta 7e4dee353e feat: Added Unauthenticated Session support.
chore: Upgraded Core to 9.9.0.
chore: Upgraded Core Gradle Plugins to 1.1.2 (Detekt update).
2023-01-26 16:57:21 +00:00
Zorica Stojchevska b62e4db0c8 Changed build version for a new release 2023-01-26 14:10:05 +01:00
Zorica Stojchevska 869bc6c205 Check if image media permission was granted on sdk 33 2023-01-26 14:09:44 +01:00
Zorica Stojchevska 46661e8925 Changed build version for a new release 2023-01-24 07:44:06 +01:00
Zorica Stojchevska 19d6e4a036 Merge branch 'feat/authenticity_badge' into 'develop'
Feat/authenticity badge

See merge request android/mail/proton-mail-android!1231
2023-01-23 20:26:50 +00:00
Zorica Stojchevska 8c879d4f4d Correct radius for authenticity badge 2023-01-23 19:34:28 +00:00
Zorica Stojchevska b5fdae3a68 Adding authenticity badge for emails sent from Proton to user 2023-01-23 19:34:28 +00:00
Zorica Stojchevska 796ac3bee2 Merge branch 'fix/incomplete_message_sent' into 'develop'
Don't save body of message echoed from BE in DB while composing

See merge request android/mail/proton-mail-android!1232
2023-01-23 17:55:09 +00:00
Zorica Stojchevska fe2683716b Don't save body of message echoed from BE in DB while composing
The purpose of this change is to keep the composer as source of truth.

MAILAND-3028
2023-01-23 15:00:45 +01:00
Zorica Stojchevska a9607f3ab8 Merge branch 'chore/translations-2023-01-23_063515' into 'develop'
i18n: Upgrade translations from crowdin (6ab23b70).

See merge request android/mail/proton-mail-android!1230
2023-01-23 07:44:23 +00:00
proton-ci a459694c7f i18n: Upgrade translations from crowdin (6ab23b70). 2023-01-23 06:35:16 +00:00
Zorica Stojchevska 6ab23b70b2 Changed build version
#comment Just changed the version for a new release
Affected: nothing
2023-01-20 08:14:25 +01:00
Zorica Stojchevska 2df2675ac2 Merge branch 'fix/target_sdk_33' into 'develop'
Targeting sdk 33 to allow for granular media permissions

See merge request android/mail/proton-mail-android!1225
2023-01-18 16:25:14 +00:00
Zorica Stojchevska 8f4538e4fc Ask Notification permissions at runtime 2023-01-18 14:01:45 +00:00
Zorica Stojchevska 6c951a5f7d Targeting sdk 33 to allow for granular media permissions 2023-01-18 14:01:45 +00:00
Zorica Stojchevska 2ff680c6a3 Merge branch 'chore/upgrade_core_9_8_0' into 'develop'
Chore/upgrade core 9 8 0

See merge request android/mail/proton-mail-android!1215
2023-01-18 14:01:31 +00:00
Neil Marietta 7034de8c21 Fix Flow tests failing due to splashscreen blocking UI thread.
From Marino Meneghel:

When updating to core version 9.8.0 (PR#263) the "flow" tests started
failing with the following error:
> Could not launch intent Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x14008000 cmp=ch.protonmail.android.dev/ch.protonmail.android.MainActivity } within 45000 milliseconds. Perhaps the main thread has not gone idle within a reasonable amount of time?

which resulted being caused by the splashscreen
`setKeepOnScreenCondition` blocking the UI thread due to being
continuously evaluated. This somehow prevented the `Launcher` composable
from retrieving any state updates from its ViewModel, which in turn
caused the redirect to the "login" activity not to happen.

While the root cause for this to start failing was not pinpointed
with confidence, the main suspect is the update / addition of some compose
dependencies (compose 1.2.0-rc02 -> 1.3.2, compose-foundation 1.3.1 and
compose-material 1.3.1 added).

The fix consists in changing the behavior of the splashscreen to only
stay visible while the `LauncherViewModel` is being initialised
(represented by the `Processing` state) and remove it afterwards.

This seems to be a better behavior than the previous one, as instead
of leveraging the fact that launching the Login activity would pause
`MainActivity` (effectively freeing the UIThread from the splashScreen
stalking) it actually only keeps the splash screen shown for the minimun
needed time and then delegates to the "Launcher" the responsibility of
choosing what to show.
2023-01-18 13:25:05 +01:00
Neil Marietta cf485da817 Fixed ActivityScenario Tests (use launchActivityForResult to be able to getResult). 2023-01-18 11:50:15 +01:00
Neil Marietta 1e29b3da4a Upgraded Turbine to 0.12.1. 2023-01-17 10:23:31 +01:00
Neil Marietta 5b4f9c2864 Added when remaining branches. 2023-01-16 07:52:06 +00:00
Neil Marietta df90db845b Upgraded Core to 9.8.0. 2023-01-16 07:52:06 +00:00
Neil Marietta 59dcf40fba Upgraded Gradle Wrapper to 7.6. 2023-01-16 07:52:06 +00:00
Zorica Stojchevska 6409df3887 Merge branch 'chore/translations-2023-01-16_062449' into 'develop'
i18n: Upgrade translations from crowdin (4b9765e5).

See merge request android/mail/proton-mail-android!1229
2023-01-16 07:51:28 +00:00
proton-ci 792ec97aa8 i18n: Upgrade translations from crowdin (4b9765e5). 2023-01-16 06:24:49 +00:00
Marin Thiercelin 4b9765e58b Merge branch 'feat/3015_disable_untrusted_keys' into 'develop'
MAILAND-3015 : Disable WKD encryption when x-pm-encrypt-untrusted is set to false.

See merge request android/mail/proton-mail-android!1201
2023-01-12 12:26:45 +00:00
Marin Thiercelin 046b6830b3 Merge branch 'fix/check-pin-key-can-encrypt' into 'feat/3015_disable_untrusted_keys'
Send preferences fix: check pin key can encrypt and is valid.

See merge request android/mail/proton-mail-android!1226
2023-01-12 11:22:34 +00:00
M. Thiercelin afc909e1ae
Compare pinned keys with list of WKD keys
In case of an external contact with pinned keys and WKD keys, we
check that the pinned key is in the list of the WKD keys.
2023-01-12 12:14:55 +01:00
M. Thiercelin 83c77fa9af Add test for pinned key with expired encryption key
When the pinned key has no valid encryption key, the app
should not use it to send mail, instead it should warn the user
that the pinned key is invalid.
2023-01-12 10:57:40 +00:00
M. Thiercelin 3297903eff Revert to compare key fingerprints for send preferences
Because of third-pary signatures, like the ones from ProtonCA,
comparing full keys would be problematic when the signature changes.
We revert to comparing fingerprints for now, in the future we will
need to strip third-party signatures before comparing keys.
2023-01-12 10:57:40 +00:00
M. Thiercelin 7e9e232a1f Send preferences: Compare full keys instead of fingerprint
The send preferences should check the full keys, because a key
could have changed its subkeys or encryption preferences, but
kept the same fingerprint.
2023-01-12 10:57:40 +00:00
M. Thiercelin 277f9a723f Fix: Send preferences: check that pinned keys can encrypt. 2023-01-12 10:57:40 +00:00
M. Thiercelin 82c2431bd5 Disable WKD encryption when x-pm-encrypt-untrusted is set to false.
So far mail clients were supposed to encrypt by default if the server
returned untrusted encryption keys (usually retrieved from WKD).
The web client will add a feature to allow users to disable encryption
for those untrusted keys, in which case the message would be sent in
plaintext.
This is signaled by adding the 'x-pm-encrypt-untrusted: false' flag to
the signed part of the contact.

MAILAND-3015
2023-01-12 10:57:11 +00:00
Zorica Stojchevska 8741eac50a Merge branch 'fix/fix_crash_for_userid_missing_when_opening_a_message_from_notifications' into 'develop'
Make sure we always have a userId to pass to the intent.

See merge request android/mail/proton-mail-android!1227
2023-01-11 15:20:52 +00:00
Zorica Stojchevska b2888b5356 Make sure we always have a userId to pass to the intent. 2023-01-11 14:46:04 +01:00
Zorica Stojchevska 90aa1084e3 Merge branch 'fix/2714_send-preferences-verification-flags' into 'develop'
Refactor SendPreference and Add support for WKD keys

See merge request android/mail/proton-mail-android!926
2023-01-09 16:41:25 +00:00
M. Thiercelin 9aa5fac815 Read sign flag of contact regardless of pinned keys 2023-01-09 14:33:30 +00:00
M. Thiercelin 8d3ab350c0 Use default sign settings when contact flag doesn't specify 2023-01-09 14:33:30 +00:00
M. Thiercelin eae6aa37f9 Only use the contact encryption flags when using a pinned key.
In the case of internal keys or wkd keys, we encrypt and sign email by defaults.
The contact encryption flags will only be relevant when using a pinned key.
2023-01-09 14:33:30 +00:00
M. Thiercelin 9cec5a3851 Always sign when using e2e encryption to recipients without contact preferences 2023-01-09 14:33:30 +00:00
M. Thiercelin db1a1f70c8 Mention reason why we are using WKD pinned keys by default 2023-01-09 14:33:30 +00:00
M. Thiercelin 782cae2c7e Reuse existing logic for mime type selection 2023-01-09 14:33:30 +00:00
M. Thiercelin f2b613a323 Use contact encryption key, even if the encrypt flag is not specified.
Mail web has a bug when creating contacts from WKD clients, which means
that the android client was ignoring the encryption key.
We fix it by encrypting by default if the encryption flag is not set in
the vcard.
2023-01-09 14:33:30 +00:00
M. Thiercelin f6e7ae708b Change the mime type when using PGP/Inline 2023-01-09 14:33:30 +00:00
M. Thiercelin d147800b37 External send preferences should use encryption keys from WKD
When sending to an external recipient that has set up WKD, the
client needs to use the public keys to encrypt the message.
2023-01-09 14:33:30 +00:00
M. Thiercelin e210cfb176 Make private function protected to be testable 2023-01-09 14:33:30 +00:00
M. Thiercelin 6e4d2e5e36 Fix unit tests for SendPreferencesFactory 2023-01-09 14:33:30 +00:00
M. Thiercelin afff470616 Fix send preferences unit test 2023-01-09 14:33:30 +00:00
M. Thiercelin 7945d94c83 Refactor composer dialogs handling for pinned keys 2023-01-09 14:33:30 +00:00