Repository navigation
Commit fa5d4e2
committed
Catch NoSuchFieldError in AccessibilityBridge.setBoldTextFlag
Vendor-modified Android 11 ROMs (e.g., OnePlus) may report SDK_INT >= 31
but lack the Configuration.fontWeightAdjustment field added in AOSP API 31.
The runtime integer guard is insufficient because the JVM resolves field
references at method call time. Wrap the access in try/catch to gracefully
degrade rather than crashing at app startup.
Fixes flutter#1842861 parent 3688546 commit fa5d4e2
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
666 | 674 | | |
667 | 675 | | |
668 | 676 | | |
| |||
0 commit comments