Skip to content
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

Do not show AutoFill UI on Termux start and add support for usernames #4125

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

agnostic-apollo
Copy link
Member

@agnostic-apollo agnostic-apollo commented Aug 26, 2024

  • The AutoFill type and hints are no longer hardcoded in TerminalView class and TermuxActivity layout xml. They are dynamically set to required values before making a manual AutoFill request and reverted back afterwards to default values. The hardcoded value AUTOFILL_TYPE_TEXT returned by getAutofillType() was causing the AutoFill UI to show on Activity starts, this will return AUTOFILL_TYPE_NONE by default now so that AutoFill UI isn't shown automatically.
  • The AutoFill importance is no longer hardcoded in TermuxActivity layout xml and is returned by TerminalView class itself by getImportantForAutofill().
  • The AutoFill function in TermuxActivity for making a manual AutoFill request is moved to TerminalView class. This and moving of hardcoded values to TerminalView class mentioned above is done as complete logic of AutoFill should be handled by TerminalView class itself and not scattered in various places.
  • The Terminal context menu now supports AutoFilling a username. Note that GBoard/Google Password Manager seems to have a bug where it will still show Pick a saved password instead of username, even though AUTOFILL_HINT_USERNAME is being requested, however it will still AutoFill a username of selected entry correctly.
  • Pressing the back button to close the keyboard will also cancel the current manually requested AutoFill request and UI will not show when keyboard is opened again.

Closes #3909

GitHub action builds are available at https://github.com/termux/termux-app/actions/runs/10581452105?pr=4125.

…for usernames

- The AutoFill type and hints are no longer hardcoded in `TerminalView` class and `TermuxActivity` layout xml. They are dynamically set to required values before making a manual AutoFill request and reverted back afterwards to default values. The hardcoded value `AUTOFILL_TYPE_TEXT` returned by `getAutofillType()` was causing the AutoFill UI to show on Activity starts, this will return `AUTOFILL_TYPE_NONE` by default now so that AutoFill UI isn't shown automatically.
- The AutoFill importance is no longer hardcoded in `TermuxActivity` layout xml and is returned by `TerminalView` class itself by `getImportantForAutofill()`.
- The AutoFill function in `TermuxActivity` for making a manual AutoFill request is moved to `TerminalView` class. This and moving of hardcoded values to `TerminalView` class mentioned above is done as complete logic of AutoFill should be handled by `TerminalView` class itself and not scattered in various places.
- The Terminal context menu now supports AutoFilling a username. Note that GBoard/Google Password Manager seems to have a bug where it will still show `Pick a saved password` instead of username, even though `AUTOFILL_HINT_USERNAME` is being requested, however it will still AutoFill a username of selected entry correctly.
- Pressing the back button to close the keyboard will also cancel the current manually requested AutoFill request and UI will not show when keyboard is opened again.

Closes #3909
@agnostic-apollo agnostic-apollo merged commit c2d57f2 into master Aug 27, 2024
4 checks passed
@agnostic-apollo agnostic-apollo deleted the autofill-improv branch August 27, 2024 15:48
fornwall added a commit to termux-play-store/termux-apps that referenced this pull request Oct 1, 2024
fornwall added a commit to termux-play-store/termux-apps that referenced this pull request Oct 21, 2024
fornwall added a commit to termux-play-store/termux-apps that referenced this pull request Oct 21, 2024
fornwall added a commit to termux-play-store/termux-apps that referenced this pull request Oct 21, 2024
fornwall added a commit to termux-play-store/termux-apps that referenced this pull request Oct 21, 2024
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.

[Bug]: Password Autofill Provider shows on termux
1 participant