On Android 10 the share files feature fails when the default
directory is selected. When selecting a custom directory, the
permission is explicitly asked to the user, which makes the
feature work. When the location is switched back to the default
location, the feature is again broken.
The requestLegacyExternalStorage flag brings back the old
behavior and allows to write in the directory. It should be however
ignored for Android >= 11 according to the docs:
https://developer.android.com/training/data-storage/use-cases#opt-out-in-production-app
From Android 11, the Downlods directory should not need specific permissions.
## Summary
1) Fix the code responsible for loading the trusted network list.
2) The old `#_#` delimiter has been replaced with a less likely NUL character. This requires re-adding trusted networks, so I can revert it if necessary.
3) Ignore incoming identity packets on untrusted devices if they come from an untrusted device.
BUG: 492302
## Test Plan
### Before:
1) Trusted networks were completely broken, an would show variations of `#` and `_` on the list due to a bug in the splitting code.
2) Any network with `#_#` in the SSID - although unlikely - would not be possible to use as a trusted network.
3) The device was still discoverable on an untrusted network by manually refreshing the devices list.
### After:
1) Trusted networks now load the SSID list correctly.
2) Networks with `#_#` in the SSID can be added as trusted networks.
3) The device is no longer discoverable on an untrusted network.
Auto reconfiguration of own certificate:
currently:
if kdeconncect loads its certificate and its expired or not effective yet
it generates a new certificate and deletes all remembered devices
(since these will stay unreachable anyways)
previously:
if kdeconncect loads its certificate and its expired or not effective yet
it continues having the same certificate
This brings forth an issue: Other devices would refuse to connect to a device with
an expired or non-effective certificate.
Auto-delete of orphan certificates:
currently:
Devices in kdeconnect's devicelist that have illegal ssl certificates
(expired, not effective yet, empty) get automatically deleted from the
devicelist
previously:
they would just exist forever until the user deletes them
This MR is a continuation of !439 , which changes the default
behavior of the remote mouse plugin's drag and drop trigger
to be a double-tap to drag, and adds a new SwitchPreference
that toggles between the old (hold to drag) and new behavior.