Mercurial > libervia-backend
diff sat/plugins/plugin_misc_android.py @ 3661:cbb988a6f507
merge bookmark `@`
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 08 Sep 2021 11:20:37 +0200 |
parents | 3910ad643e9d |
children | 524856bd7b19 |
line wrap: on
line diff
--- a/sat/plugins/plugin_misc_android.py Wed Sep 01 15:25:02 2021 +0200 +++ b/sat/plugins/plugin_misc_android.py Wed Sep 08 11:20:37 2021 +0200 @@ -309,9 +309,11 @@ # "XXX has no attribute 'invoke'" error (looks like the same issue as # https://github.com/kivy/pyjnius/issues/59) self.br = BroadcastReceiver( - callback=lambda *args, **kwargs: reactor.callLater(0, - self.onConnectivityChange), - actions=["android.net.conn.CONNECTIVITY_CHANGE"]) + callback=lambda *args, **kwargs: reactor.callFromThread( + self.onConnectivityChange + ), + actions=["android.net.conn.CONNECTIVITY_CHANGE"] + ) self.br.start() @property