BUG 476551: Check autoshare before syncing clipboard on connect
Summary
Continues !548 (merged) where clipboard autoshare was made optional. In that patch, the option was only checked on clipboard change. On device connection, the clipboard was sent unconditionally. This patch adds a check for the option before sending the clipboard on device connection.
Since there is no content type available in the connect event (like there is in the clipboard changed event), I assume that if password autoshare is disabled, the unknown clipboard contents should not be shared on connect.
Add a description of your merge request here. What does your new feature do?
BUG: 476551
Test Plan
Before:
See the bug description for good reproduction steps. Briefly:
- Setup: device is disconnected, clipboard autoshare is disabled, and text is in desktop clipboard
- Connect device
- Desktop clipboard has been sent to device automatically
After:
- Same setup
- Connect device
- Desktop clipboard is not sent to device (device retains previous local clipboard contents)