Skip to content

Refactor PairingHandler

Albert Vaca Cintora requested to merge work/refactor-pairinghandler into master
  • Removes the weird abstraction where each LinkProvider had their own PairingHandler, now we have a single PairingHandler which handles the pairing process. It doesn't seem that the logic we have in PairingHandler at the moment (request pairing -> accept/reject pairing) should be different in other LinkProviders, plus having an abstraction for a single implementation doesn't usually work. Now each Device has a single PairingHandler instead of an array.
  • Showing the pairing notifications is now done in the Device class, instead of half in the Device class and half in the PairingHandler. It's not ideal to have this UI-related stuff in Device, but at least now it's all in a single place.
  • Removed some code which allowed devices to be paired without a Certificate, which was left over from the times where that was okay.
  • The pair state is now only stored in PairingHandler, instead of both in Device and PairingHandler.
  • Added some logging in edge cases like receiving a pairing request when already paired, two pair requests in a row, etc.

Equivalent MR for the desktop client: kdeconnect-kde!547 (merged)

Edited by Albert Vaca Cintora

Merge request reports