Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash when Pin code screen is displayed #3205

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Jul 16, 2024

Content

Ensure that lineHeight cannot be negative, else the application crashes.

Motivation and context

Closes https://github.com/element-hq/element-x-android-rageshakes/issues/2386

Screenshots / GIFs

Tests

  • Cannot repro the crash, but can repro the error by tweaking the Preview height of PinUnlockViewPreview. With this fix the Preview is always rendered without issue.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

Fix crash `Exception: java.lang.IllegalStateException: lineHeight can't be negative`
Can be due to the rendering when the Activity is animated maybe?
@bmarty bmarty added the PR-Bugfix For bug fix label Jul 16, 2024
@bmarty bmarty requested a review from a team as a code owner July 16, 2024 14:05
@bmarty bmarty requested review from jmartinesp and removed request for a team July 16, 2024 14:05
Copy link
Contributor

github-actions bot commented Jul 16, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/pho8Pg

Copy link

sonarcloud bot commented Jul 16, 2024

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@bmarty bmarty enabled auto-merge July 16, 2024 14:48
Copy link

codecov bot commented Jul 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.14%. Comparing base (d9599a2) to head (83a366a).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3205   +/-   ##
========================================
  Coverage    76.14%   76.14%           
========================================
  Files         1644     1644           
  Lines        38758    38759    +1     
  Branches      7501     7501           
========================================
+ Hits         29513    29514    +1     
  Misses        5350     5350           
  Partials      3895     3895           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty merged commit de62c12 into develop Jul 16, 2024
30 checks passed
@bmarty bmarty deleted the feature/bma/fixPinCrash branch July 16, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants