Request incognito keyboard for sensitive Android inputs#8539
Request incognito keyboard for sensitive Android inputs#8539KingParmenides wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Android support for requesting an “incognito” IME mode on sensitive inputs by bridging to a native SettingsModule method that sets EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING on the currently focused editor and restarts the IME.
Changes:
- Introduces an Android TurboModule method
requestKeyboardIncognitoMode()plus a JS helper wrapper to invoke it. - Adds
IncognitoKeyboardTextInputand routes password / passphrase / mnemonic entry points through it (and updates the Android secure prompt flow). - Updates existing screens/components (import speed, password confirmation sheet, password input, mnemonic multi-input) to request incognito mode on focus.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| screen/wallets/ImportSpeed.tsx | Uses IncognitoKeyboardTextInput for the import-speed passphrase field. |
| screen/PromptPasswordConfirmationSheet.tsx | Replaces password/confirm password TextInput with incognito-enabled input. |
| helpers/prompt.ts | Requests incognito mode for Android secure prompts after showing the prompt. |
| components/PasswordInput.tsx | Swaps to IncognitoKeyboardTextInput for password entry. |
| components/IncognitoKeyboardTextInput.tsx | New wrapper component that requests incognito mode on focus and adjusts text input defaults. |
| codegen/NativeSettingsModule.ts | Extends TurboModule spec with requestKeyboardIncognitoMode(). |
| BlueComponents.tsx | Makes BlueFormMultiInput use IncognitoKeyboardTextInput (for mnemonic-style multiline inputs). |
| blue_modules/SettingsModule.ts | Updates TS interface to include requestKeyboardIncognitoMode(). |
| blue_modules/requestKeyboardIncognitoMode.ts | New helper to invoke the native incognito request on Android. |
| android/app/src/main/java/io/bluewallet/bluewallet/SettingsModule.kt | Implements the native Android method to set IME_FLAG_NO_PERSONALIZED_LEARNING and restart the IME. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ref={ref} | ||
| autoCapitalize={incognitoKeyboard ? (autoCapitalize ?? 'none') : autoCapitalize} | ||
| autoCorrect={incognitoKeyboard ? (autoCorrect ?? false) : autoCorrect} | ||
| importantForAutofill={incognitoKeyboard ? (importantForAutofill ?? 'no') : importantForAutofill} |
|
|
||
| if (Platform.OS === 'android' && type === 'secure-text') { | ||
| setTimeout(requestKeyboardIncognitoMode, 250); | ||
| } |
|
Checked the current head
The branch is already updated for those comments and the configured Socket/Snyk checks are green. |
|
CI note after the latest run:
I do not see a code failure in those release jobs; the remaining blocker is maintainer review / CI permissions. |
| <TextInput | ||
| <IncognitoKeyboardTextInput | ||
| ref={inputRef} | ||
| incognitoKeyboard |
There was a problem hiding this comment.
This property can be removed, so as autoCapitalize, autoCorrect and spellCheck
|
Updated in Changes:
Re-ran locally:
|
|
this PR is not following CONTRIBUTING.md guidelines |
Summary
EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNINGto the currently focused text editor and restarts the IME.Fixes #2235.
Bounty payout address:
BTC: 39Q34P8A7g375yqEr8buvNJkUbRgKfbKQZTest plan
npm run lint./node_modules/.bin/prettier --check --single-quote --print-width 140 --trailing-comma all --arrow-parens avoid BlueComponents.tsx blue_modules/SettingsModule.ts blue_modules/requestKeyboardIncognitoMode.ts codegen/NativeSettingsModule.ts components/IncognitoKeyboardTextInput.tsx components/PasswordInput.tsx helpers/prompt.ts screen/PromptPasswordConfirmationSheet.tsx screen/wallets/ImportSpeed.tsxgit diff --checkNot run: Android/Gradle build. This machine has no Java runtime installed (
java -versionfails before Gradle starts).