[GH-ISSUE #1165] Android 11: Clipboard doesn't clear if password is never pasted #7174

Closed
opened 2026-04-10 23:35:39 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lynshi on GitHub (Dec 3, 2020).
Original GitHub issue: https://github.com/bitwarden/android/issues/1165

Describe the Bug

On Android 11, I have set the Bitwarden option to clear the clipboard after 10 seconds. After I copied a password, the password is still available in my clipboard after 10 seconds if it is never pasted.

Steps To Reproduce

  1. Set the time for clearing the clipboard to 10 seconds.
  2. Copy a password and leave the Bitwarden app open in the foreground for 10 seconds.
  3. Put Bitwarden in the background and wait for 10 seconds.
  4. Go to any text entry field and you are able to paste the password. You may also notice the copied text being suggested on the Google Keyboard.

Expected Result

After 10 seconds, the clipboard is empty and nothing pastes.

Actual Result

The copied text is still available to be pasted once after the time to clear the clipboard elapses. After pasting, the clipboard is cleared.

Environment

  • Device: Google Pixel 3 XL
  • Operating system: Android 11
  • Build Version (go to "Settings" → "About" in the app): 2.7.0 (3258)
  • Is this a Beta release? N
Originally created by @lynshi on GitHub (Dec 3, 2020). Original GitHub issue: https://github.com/bitwarden/android/issues/1165 <!-- Comment: Please do not submit feature requests. The [Community Forums][1] has a section for submitting, voting for, and discussing product feature requests. [1]: https://community.bitwarden.com --> ## Describe the Bug <!-- Comment: A clear and concise description of what the bug is. --> On Android 11, I have set the Bitwarden option to clear the clipboard after 10 seconds. After I copied a password, the password is still available in my clipboard after 10 seconds if it is never pasted. ## Steps To Reproduce <!-- Comment: How can we reproduce the behavior: --> 1. Set the time for clearing the clipboard to 10 seconds. 2. Copy a password and leave the Bitwarden app open in the foreground for 10 seconds. 3. Put Bitwarden in the background and wait for 10 seconds. 4. Go to any text entry field and you are able to paste the password. You may also notice the copied text being suggested on the Google Keyboard. ## Expected Result <!-- Comment: A clear and concise description of what you expected to happen. --> After 10 seconds, the clipboard is empty and nothing pastes. ## Actual Result <!-- Comment: A clear and concise description of what is happening. --> The copied text is still available to be pasted once after the time to clear the clipboard elapses. After pasting, the clipboard is cleared. ## Environment - Device: Google Pixel 3 XL - Operating system: Android 11 - Build Version (go to "Settings" → "About" in the app): 2.7.0 (3258) - Is this a Beta release? N
Author
Owner

@lynshi commented on GitHub (Dec 10, 2020):

This actually doesn't seem to be a Bitwarden bug per se. If you hold a text area and click "Paste" from the menu that shows up after the clipboard clear timeout, nothing pastes. However, the password is still suggested by the Google Keyboard (see clipboard suggestions), which is probably caching the latest non-empty clipboard entry.

However, this might be fixed if the ClearClipboardAlarmReceiver sets the clipboard text to a string with a space in it like how the browser extension clears the clipboard. It's possible the Gboard suggestions would pick up the space in that case.

<!-- gh-comment-id:742236416 --> @lynshi commented on GitHub (Dec 10, 2020): This actually doesn't seem to be a Bitwarden bug per se. If you hold a text area and click "Paste" from the menu that shows up after the clipboard clear timeout, nothing pastes. However, the password is still suggested by the Google Keyboard (see [clipboard suggestions](https://www.androidpolice.com/2020/04/23/clipboard-suggestions-spotted-in-gboard/)), which is probably caching the latest non-empty clipboard entry. However, this might be fixed if the [`ClearClipboardAlarmReceiver`](https://github.com/bitwarden/mobile/blob/dcfdc7d0eaa31e935e63d3906041e1c0abffb059/src/Android/Receivers/ClearClipboardAlarmReceiver.cs#L11) sets the clipboard text to a string with a space in it like how the browser extension clears the clipboard. It's possible the Gboard suggestions would pick up the space in that case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#7174