ClipboardPlugin: Fixing the workaround for Android 10.
This is to fix https://invent.kde.org/kde/kdeconnect-android/-/merge_requests/127 for OnePlus devices(possibly others)running Android 10. !127 (merged) worked with Pixel-based ROMs but didn't work on OnePlus ROM i.e OxygenOs. The issue was that the
ClipboardFloatingActivity had no layout resource file. OxygenOS seems to have its own theming strategy when there is no layout present for an Activity. As a result, the activity never gained focus and lead to weird undefined behavior, one of which is hanging above other apps and freezing. Adding a layout file with a button succeeds in gaining focus. Other widgets didn't work.
This was tested by many people on:
- OnePlus 6 running OxygenOS 10.3.2
- Xiaomi Mi A1 running Derpfest 10-20200407
- OnePlus 7T running Android 10
- OnePlus 7T Pro running Oxygen OS 10.3.2
- Xiaomi Mi A2 running Android 10
This should now work on every device reliably.
When clicking "Send Clipboard" button from the persistent notification was clicked, it hanged over other apps or froze the system UI on OnePlus devices. Other undefined behaviors too.
"Send Clipboard" button works reliably on all Android 10 devices.