Skip to content

fix(TokenCompleteTextView): handle missing generic type signature for R8/ProGuard compatibility#10711

Merged
rafaeltonholo merged 1 commit into
thunderbird:mainfrom
rafaeltonholo:fix/10710/composer-crash-when-add-attachment
Mar 18, 2026
Merged

fix(TokenCompleteTextView): handle missing generic type signature for R8/ProGuard compatibility#10711
rafaeltonholo merged 1 commit into
thunderbird:mainfrom
rafaeltonholo:fix/10710/composer-crash-when-add-attachment

Conversation

@rafaeltonholo
Copy link
Copy Markdown
Member

Fixes #10710.

Description

R8 is now stripping the generic Signature attribute from some classes, which caused the getGenericSuperclass() to return a raw Class instead of the expected ParameterizedType.

To fix the runtime crash issue, we now check if the generic superclass is an instance of ParameterizedType before getting the type arguments. Otherwise, we fall back to Object.class, so it triggers the Serializable path when saving the class to the Bundle.

Screen recording:

Screen.Recording.2026-03-18.at.9.46.42.AM.mp4

@rafaeltonholo rafaeltonholo requested a review from a team as a code owner March 18, 2026 12:52
@github-actions github-actions Bot added the tb-team Tasks and features handled by project maintainers label Mar 18, 2026
@rafaeltonholo rafaeltonholo requested review from wmontwe and removed request for jbott-tbird March 18, 2026 12:53
@rafaeltonholo rafaeltonholo assigned wmontwe and unassigned jbott-tbird Mar 18, 2026
Copy link
Copy Markdown
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafaeltonholo rafaeltonholo merged commit 5a76d67 into thunderbird:main Mar 18, 2026
18 checks passed
@rafaeltonholo rafaeltonholo deleted the fix/10710/composer-crash-when-add-attachment branch March 18, 2026 13:20
@thunderbird-botmobile thunderbird-botmobile Bot added this to the Thunderbird 19 milestone Mar 18, 2026
rafaeltonholo added a commit to rafaeltonholo/thunderbird-android that referenced this pull request Mar 18, 2026
stephenking314 added a commit that referenced this pull request Mar 18, 2026
@wmontwe wmontwe added the report: include Include changes in user-facing reports. label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

report: include Include changes in user-facing reports. tb-team Tasks and features handled by project maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18.0b1 compose window crashes when attaching attachment

3 participants