# HG changeset patch # User Goffi # Date 1563648832 -7200 # Node ID 758bee45612bacd705633d1a7cca6f12ac9bedba # Parent e7cbe662838b2a2a9bd5c1534a8c38be7db718de plugin android: catch and log exception when using the vibrator: vibrator is currently not working with plyer, this patch avoid a crash and log the issue. rel 332 diff -r e7cbe662838b -r 758bee45612b sat/plugins/plugin_misc_android.py --- a/sat/plugins/plugin_misc_android.py Sat Jul 20 16:03:28 2019 +0200 +++ b/sat/plugins/plugin_misc_android.py Sat Jul 20 20:53:52 2019 +0200 @@ -243,7 +243,12 @@ if self.host.memory.getParamA( PARAM_VIBRATE_NAME, PARAM_VIBRATE_CATEGORY, profile_key=client.profile ): - vibrator.vibrate() + try: + vibrator.vibrate() + except Exception as e: + # FIXME: vibrator is currently not working, + # cf. https://github.com/kivy/plyer/issues/509 + log.warning(u"Can't use vibrator: {e}".format(e=e)) return mess_data def messageReceivedTrigger(self, client, message_elt, post_treat):