-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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/9905 crash inflate exception binary xml file line #10279
Fix/9905 crash inflate exception binary xml file line #10279
Conversation
Generated by 🚫 dangerJS |
I think you're keeping the previous functionality by this approach (it would've crashed even before if the If you wanna add a non-null check, you can do something like this:
I'm not sure it's worth the extra effort |
Exactly - I think Marko's code in that regard looks ok as is, as not having a non-null FragmentManager at any point is probably good to let it crash |
Closing this one in favor of #11172 |
…L_file_line # Conflicts: # WordPress/build.gradle # WordPress/src/main/java/org/wordpress/android/ui/main/MainBottomSheetFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/pages/PagesFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/reader/SubfilterBottomSheetFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/sitecreation/siteinfo/SiteCreationSiteInfoFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/sitecreation/verticals/SiteCreationVerticalsFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/widget/configuration/StatsWidgetConfigureFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/widget/configuration/StatsWidgetSiteSelectionDialogFragment.kt # WordPress/src/main/java/org/wordpress/android/ui/stats/refresh/lists/widget/minified/StatsMinifiedWidgetConfigureFragment.kt # WordPress/src/main/res/values/styles.xml # libs/editor/WordPressEditor/build.gradle # libs/login/WordPressLoginFlow/build.gradle # libs/login/WordPressLoginFlow/src/main/java/org/wordpress/android/login/widgets/WPLoginInputRow.java
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
…L_file_line # Conflicts: # libs/login/WordPressLoginFlow/src/main/res/drawable-xhdpi/ic_password_visibility.png
Fixes #9905
The main approach for a potential fix is to increment
android material library
from1.0.0
to1.1.0-rc01
.Reason for that was because the codebase from the library was much improved.
They changed a logic around crashing line from old release and general logic how drawables can be set. https://github.com/material-components/material-components-android/blob/cd59e98f7e2185ddb075ff0fc91f29765d562968/lib/java/com/google/android/material/textfield/TextInputLayout.java#L344
(log -> https://sentry.io/share/issue/9eaadccac3be4c259943d72c46427792/).
Thanks to @mzorz comment 👉 #9905 (comment) I got inspired to make one more step in this fix.
The second approach is to use our own xml which represents show/hide password icon in order to avoid a potential crash if icon can't be found in runtime.
Note: The new version of
android material library
forced some compile time issues :⬆️ this was resolved with adding
!!
and as I am not experienced in Kotlin, if someone has some better approach I am open for suggestions.To test:
It's very hard to reproduce crash from the logs. However, one should check for potential regressions.
In order to achieve that one should open and check every screen where
TextInputLayout
or any other component frommaterial
library is used. EspeciallyEnter your WordPress password
screen should be checked, where password visibility icon (show/hide password) shod work as before (expected).Update release notes:
RELEASE-NOTES.txt
.