Fix app crashes on android 6#64
Merged
Merged
Conversation
2 tasks
2 tasks
|
Debug APK built successfully! Download artifact: debug-apk Artifact will be available for 7 days |
LandWarderer2772
approved these changes
May 9, 2026
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had two problems on issue #63.
Issue 2: Android 6 "Bad position" (ICU Decoder) Bug
Android 6.0 (API 23) contains a system-level bug in the
java.niocharset decoder (ICU). When decoding certain byte sequences from a network response into aString, the decoder can incorrectly flush its buffer, leading to anIllegalArgumentException: Bad position. This prevents the app from correctly detecting and handling Cloudflare protection on older devices.Current Workaround:
I implemented a manual byte-peeking and decoding strategy in
CloudFlareInterceptor.ktspecifically for API 23 to bypass the buggy system decoder for basic protection detection.While our interceptor now has a safety check, the core
CloudFlareHelperwithin the kotatsu-parsers-redo library still relies on standard decoding methods that trigger this crash. To fully resolve this problem, Kotatsu-Redo team needs to updateCloudFlareHelperto avoid triggering the ICU bug on Android 6 (e.g., by using a safer decoding approach or peeking the source).Issue 2: Focus Search Crash
When hitting enter on the search bar the app would throw the following exception:
java.lang.IllegalStateException: focus search returned a view that wasn't able to take focus!Solution:
I've updated the
item_extension.xmllayout to make the root container explicitly focusable and clickable. This ensures that the list item itself serves as a stable focus target, preventing the focus-finder from failing when internal buttons disappear.Fixes #63