Hitting the PAT help button crashes when you're not using Dynamic Colors.
The bottom sheet inflates and fails because primaryTextColor isn't defined in the
base themes.
The attribute only exists in AppThemeDynamicColors (the Android 12+ variant).
AppTheme, AppThemeLight, and AppThemeDark never set it. The BottomSheetDialogFragment wraps AppTheme with its overlay, so the attribute lookup never reaches the dynamic colors theme even when that's what the
activity is using.
The ?attr/primaryTextColor in the layout can't resolve and the whole thing chokes.
To reproduce on current main:
- Set theme to System default / Light / Dark (not Dynamic Colors)
- Open any screen with the PAT help button and tap it
- Observe the crash
The fix just adds primaryTextColor to AppTheme, AppThemeLight, AppThemeDark in values/themes.xml, and the dark variant in values-night/themes.xml, mapped to the appropriate colorOnSurface for each theme.
P.S. I videcoded this whole thing, cuz that's the only sane way for me to work with java, feel free to just treat this as elaborate issue report and implement your own fix, It did seem to solve the application crash for me on Razer Phone 2 with LineageOS 22.2-20260515-NIGHTLY-aura though and the solution seems to make sense so submitting it as is.
Update: It also seem to made the app significantly faster (from pressing on button and waiting for ~3 seconds to open nearly instantly) and it doesn't crash anymore when i try to open a new issue.