Skip to content

Catch NoSuchFieldError when reading bold text setting on non-compliant vendor runtimes - #190972

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
gmackall:fix-bold-text-nosuchfielderror
Aug 14, 2026
Merged

auto-submit[bot] merged 5 commits into
flutter:masterfrom
gmackall:fix-bold-text-nosuchfielderror

Conversation

@gmackall

Copy link
Copy Markdown
Member

Some vendor-modified runtimes report API 31+ but omit the Configuration.fontWeightAdjustment field. Catch NoSuchFieldError at the Api31Impl call boundary in AccessibilityBridge and fall back to false rather than crashing at startup.

Fixes #190690

…mes (flutter#190690)

Some vendor-modified runtimes report API 31+ but omit the Configuration.fontWeightAdjustment field. Catch NoSuchFieldError at the Api31Impl call boundary in AccessibilityBridge and fall back to false rather than crashing at startup.

Fixes flutter#190690
@github-actions github-actions Bot added platform-android Android applications specifically engine flutter/engine related. See also e: labels. team-android Owned by Android platform team labels Aug 12, 2026
@gmackall
gmackall marked this pull request as ready for review August 12, 2026 00:32
@gmackall
gmackall requested a review from a team as a code owner August 12, 2026 00:32
@gmackall
gmackall requested review from mboetger and removed request for a team August 12, 2026 00:32
@gmackall gmackall added the CICD Run CI/CD label Aug 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request wraps the bold text detection for API 31 in a try-catch block to handle NoSuchFieldError on vendor-modified runtimes, preventing startup crashes. The reviewer suggests catching LinkageError instead of NoSuchFieldError to ensure robustness against potential class-loading and linking anomalies on non-compliant devices.

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit

auto-submit Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/190972, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gmackall

Copy link
Copy Markdown
Member Author

Odd, status shows action required even after targets have been re run. I'll just update branch I suppose?

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit

auto-submit Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/190972, because - The status or check suite Mac_arm64_verify_binaries has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@gmackall

Copy link
Copy Markdown
Member Author

autosubmit label was removed for flutter/flutter/190972, because - The status or check suite Mac_arm64_verify_binaries has failed. Please fix the issues identified (or deflake) before re-applying this label.

let_me_in.gif

@auto-submit

auto-submit Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/190972, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
@auto-submit

auto-submit Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/190972, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gmackall gmackall added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-android Android applications specifically team-android Owned by Android platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android][Accessibility] AccessibilityBridge$Api31Impl.isBoldText still throws NoSuchFieldError for fontWeightAdjustment on 3.44.8

2 participants