Add runWithPlugin helper
ClosedPublic

Authored by nicolasfella on Oct 27 2018, 11:16 PM.

Details

Summary

There is a common pattern:
BackgroundService.RunCommand

getDevice
check device != null
getPlugin
check plugin != null
doCode

Add a helper for this pattern and port existing code

Diff Detail

Repository
R225 KDE Connect - Android application
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nicolasfella created this revision.Oct 27 2018, 11:16 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptOct 27 2018, 11:16 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
nicolasfella requested review of this revision.Oct 27 2018, 11:16 PM
albertvaka accepted this revision.Oct 29 2018, 1:55 PM
albertvaka added a subscriber: albertvaka.

Nice way to make it generic, ship it!

This revision is now accepted and ready to land.Oct 29 2018, 1:55 PM
This revision was automatically updated to reflect the committed changes.