immuni-app / immuni-app-android

Official repository for the Android version of the immuni application
GNU Affero General Public License v3.0
859 stars 145 forks source link

[BUG] dark mode renders QR code unreadable #354

Closed AndreaBorgia-Abo closed 2 years ago

AndreaBorgia-Abo commented 3 years ago

When dark mode is enabled on phones which support it, Immuni generates a QR code with black and white swapped, leading to a verification failure.

To reproduce

  1. enable dark mode
  2. open Immuni, download certificate if not available
  3. try to verify it

Expected behaviour QR code is properly formatted and verification succeeds

Smartphone

Additional context Corner squares should be black, thin white stripe, black. In dark mode they're rendered as white, thin black stripe, white. Ditto for the main payload area. On the same phone, under the same conditions, IO consistently generates a valid code.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

AndreaBorgia-Abo commented 2 years ago

No activity but the issue is still present: the app does not account for dark mode and messes up the QR code!

astagi commented 2 years ago

Hi @AndreaBorgia-Abo thank you for reporting this issue! Do you think it's related to Xiaomi phones or dark mode in general? I can't reproduce it on my Pixel 4a. cc @Settordici

Settordici commented 2 years ago

Hi @AndreaBorgia-Abo thank you for reporting this issue! Do you think it's related to Xiaomi phones or dark mode in general? I can't reproduce it on my Pixel 4a. cc @Settordici

Yeah it could be just a Xiaomi problem, I have a Mi 10T Pro and it presents the same issue.

AndreaBorgia-Abo commented 2 years ago

Do you think it's related to Xiaomi phones or dark mode in general?

Something in between: I can reproduce also on Samsung SM-A520F (to be fair: in the case of the Samsung office phone, the label clearly says the colors will be in the negative, not just dark mode as with my own Xiaomi, so one could well expect that white and black will be flipped)

astagi commented 2 years ago

I tried to force dark mode on my Pixel4 under.developers settings and also activated color inversion via a11y options.. looks like QRcode is rendered fine.. I don't know if it may be something related to that specific Android version (10).. @AndreaBorgia-Abo which Android version is running on your Samsung device?

sebaker88 commented 2 years ago

Hi @AndreaBorgia-Abo and @astagi. We fixed the problem, in the next release the bug will no longer be present.

AndreaBorgia-Abo commented 2 years ago

@AndreaBorgia-Abo which Android version is running on your Samsung device?

Last security patch is dated Dec.2020, for Android 8.0