Skip to content

fix(settings): Fix Android 14 Settings crash and complete English localization - #30

Open
Bluscream wants to merge 4 commits into
Luokavin:masterfrom
Bluscream:fix/android-14-settings-crash-and-en-i18n
Open

fix(settings): Fix Android 14 Settings crash and complete English localization#30
Bluscream wants to merge 4 commits into
Luokavin:masterfrom
Bluscream:fix/android-14-settings-crash-and-en-i18n

Conversation

@Bluscream

Copy link
Copy Markdown

Summary

This PR addresses two main improvements:

  1. Fix Settings Crash on Android 14+ (API 34):

    • Replaced direct Settings.Secure.getString(..., Settings.Secure.ENABLED_INPUT_METHODS) call in SettingsFragment with InputMethodManager.getEnabledInputMethodList() via KeyboardHelper.
    • On Android 14+ (targetSdk 34), reading ENABLED_INPUT_METHODS via ContentResolver throws a SecurityException: Settings key: <enabled_input_methods> is only readable to apps with targetSdkVersion lower than or equal to: 33.
    • Added Shizuku UserService fallback and one-click AutoGLM Keyboard activation when elevated privileges are available.
  2. Full English Localization (values-en/strings.xml):

    • Added complete English translations (276 strings) covering settings, voice input/recognition, history management, task status, execution logs, floating window, and dialogs.
    • Fixed positional argument format specifiers (%1$d/%2$d) in permissions_summary_partial to ensure strict format specifier parity between Chinese and English string resources.

Testing & Verification

  • Unit test suite passed for all debug and release variants (./gradlew test).
  • Debug APK compiled (./gradlew assembleDebug) and tested on physical Android 14 tablet via ADB.
  • Verified that opening the Settings tab loads and operates without crashes, properly reflecting permission statuses and English strings.

…keyboard enablement

- Replace Settings.Secure.ENABLED_INPUT_METHODS query in SettingsFragment with InputMethodManager.enabledInputMethodList via KeyboardHelper
- Prevent SecurityException on Android 14+ (API 34) when opening Settings
- Add Shizuku UserService fallback and one-click AutoGLM Keyboard activation
…ecifiers

- Add full English translations (276 strings) in values-en/strings.xml
- Fix positional format specifier '%1$d/%2$d' in permissions_summary_partial
- Ensure 1:1 key and format placeholder parity between zh and en resources
…tatus messages

- Add HTTP 401 (Authentication failed), 403, 404, 429, and server error localization to ErrorHandler
- Pass configured language to ErrorHandler and ActionHandler
- Localize PhoneAgent prompts, step descriptions, pause messages, and retry hints
- Support language parameter in AgentAction.formatForDisplay and FloatingWindowService
…econdition feedback

- Add checkShizukuState in MainActivity.onResume to automatically connect when returning to app
- Keep start task button enabled and show user feedback toast if preconditions are not met
- Add empty task validation toast in floating window start button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant