D6743: Direct Share
Albert Vaca Cintora
noreply at phabricator.kde.org
Sat Jul 29 08:11:02 UTC 2017
albertvaka accepted this revision.
albertvaka added a comment.
This revision is now accepted and ready to land.
I try to avoid statics (and hence singletons) in Android, because Android can decide to unload classes when it's low on memory, and then static variables on that class become null.
Unfortunately, I can't find any way of doing it without having a singleton class, because the ChooserTargetService has no way to access anything...
So, I guess we will have to stick with this approach.
INLINE COMMENTS
> ShareActivity.java:176
> + if (deviceId!=null) {
> + Log.d("DirectShare", "sharing to "+BackgroundService.getInstance().getDevice(deviceId).getName());
> + Device device = BackgroundService.getInstance().getDevice(deviceId);
I think here we can use the BackgroundService.RunCommand construct, instead of using the singleton... I would prefer if we only use the singleton when it's 100% necessary (ie: only from the ChooserTargetService).
REPOSITORY
R225 KDE Connect - Android application
REVISION DETAIL
https://phabricator.kde.org/D6743
To: nicolasfella, #kde_connect, albertvaka
Cc: albertvaka, #kde_connect, tfella, aboudhar, seebauer, progwolff, MayeulC, menasshock, ach, apol, hkaelberer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20170729/a20dcc8d/attachment.html>
More information about the KDEConnect
mailing list