Setting "showPicturesEnum" should default to NEVER
Showing images in E-Mails may violate privacy of users. Remote access to resources like images may be recorded, analyzed and abused to monitor activity of the user. Avoiding the loading of those images would improve privacy of a user.
Currently the default setting is "ALWAYS" which means, that resources will be always loaded, which may violate privacy of the user if not manually changed. The default setting should be changed to "NEVER" which denies loading of remote resources like images by default - users may then individually decide to load those resources anyway by simply pressing the according button in the mail view. This improves privacy and gives back control to user.
Affected files:
- k9mail/src/main/java/io/eelo/mail/preferences/AccountSettings.java
- k9mail/src/main/java/io/eelo/mail/Account.java
Proposed changes:
In: k9mail/src/main/java/io/eelo/mail/preferences/AccountSettings.java
Change:
s.put("showPicturesEnum", Settings.versions(
new Settings.V(1, new Settings.EnumSetting<>(Account.ShowPictures.class, Account.ShowPictures.ALWAYS))
));
To:
s.put("showPicturesEnum", Settings.versions(
new Settings.V(1, new Settings.EnumSetting<>(Account.ShowPictures.class, Account.ShowPictures.NEVER))
));
In: k9mail/src/main/java/io/eelo/mail/Account.java
Change:
showPictures = ShowPictures.ALWAYS;
To:
showPictures = ShowPictures.NEVER;
AND
Change:
showPictures = Preferences.getEnumStringPref(storage, accountUuid + ".showPicturesEnum", ShowPictures.ALWAYS);
To:
showPictures = Preferences.getEnumStringPref(storage, accountUuid + ".showPicturesEnum", ShowPictures.NEVER);
Additional todos:
Test cases should be added.
Patch: 0001-Set-default-preference-for-ShowPicture-to-NEVER.patch