question: public synchronized void customVibration ( final int times , final int onTime , final int offTime ) { final int newOnTime = Math . min ( onTime , 500 ) ; List < BLEAction > list = new ArrayList < > ( ) ; for ( int i = 1 ; i <= times ; i ++ ) { list . add ( new WriteAction ( Profile . UUID_CHAR_CONTROL_POINT , Protocol . VIBRATION_UNTIL_CALL_STOP ) ) ; list . add ( new WaitAction ( newOnTime ) ) ; list . add ( new WriteAction ( Profile . UUID_CHAR_CONTROL_POINT , Protocol . STOP_VIBRATION ) ) ; list . add ( new WaitAction ( offTime ) ) ; } queue ( list ) ; }
target:  Vibrate "times" times. Each iteration will start vibrator "on_time" milliseconds (up to 500, will be truncated if larger), and then stop it "off_time" milliseconds (no limit here).