1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.runtime
.lcdui
.mle
;
12 import cc
.squirreljme
.runtime
.cldc
.annotation
.SquirrelJMEVendorApi
;
13 import cc
.squirreljme
.runtime
.cldc
.debug
.Debugging
;
16 * Support for vibration.
21 public final class Vibration
33 * Attempts to vibrate the device for the given number of milliseconds.
35 * The values here only set the duration to vibrate for from the current
36 * point in time and will not increase the length of vibration.
38 * The return value will be {@code false} if the display is in the
39 * background, the device cannot vibrate, or the vibrator cannot be
42 * Note that excessive vibration may cause the battery life for a device to
43 * be lowered, thus it should be used sparingly.
45 * @param __d The number of milliseconds to vibrate for, if zero the
46 * vibrator will be switched off.
47 * @return {@code true} if the vibrator is controllable by this application
48 * and the display is active.
49 * @throws IllegalArgumentException If the duration is negative.
53 public static boolean vibrate(int __d
)
54 throws IllegalArgumentException
56 /* {@squirreljme.error EB1n Cannot vibrate for a negative duration.} */
58 throw new IllegalArgumentException("EB1n");
60 Debugging
.todoNote("Vibration?");