<s> '''<STR_LIT>''' <EOL> from jnius import autoclass <EOL> from plyer . facades import Vibrator <EOL> from plyer . platforms . android import activity <EOL> from plyer . platforms . android import SDK_INT <EOL> Context = autoclass ( '<STR_LIT>' ) <EOL> vibrator = activity . getSystemService ( Context . VIBRATOR_SERVICE ) <EOL> class AndroidVibrator ( Vibrator ) : <EOL> '''<STR_LIT>''' <EOL> def _vibrate ( self , time = None , ** kwargs ) : <EOL> if vibrator : <EOL> vibrator . vibrate ( int ( <NUM_LIT:1000> * time ) ) <EOL> def _pattern ( self , pattern = None , repeat = None , ** kwargs ) : <EOL> pattern = [ int ( <NUM_LIT:1000> * time ) for time in pattern ] <EOL> if vibrator : <EOL> vibrator . vibrate ( pattern , repeat ) <EOL> def _exists ( self , ** kwargs ) : <EOL> if SDK_INT >= <NUM_LIT:11> : <EOL> return vibrator . hasVibrator ( ) <EOL> elif activity . getSystemService ( Context . VIBRATOR_SERVICE ) is None : <EOL> raise NotImplementedError ( ) <EOL> return True <EOL> def _cancel ( self , ** kwargs ) : <EOL> vibrator . cancel ( ) <EOL> def instance ( ) : <EOL> '''<STR_LIT>''' <EOL> return AndroidVibrator ( ) </s>
