Remove Twitter links.
[SquirrelJME.git] / modules / midp-lcdui / src / main / java / cc / squirreljme / runtime / lcdui / mle / Vibration.java
blobbcc5fbc6dcde9286af45c51de03beb47eebab4fb
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
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;
15 /**
16 * Support for vibration.
18 * @since 2022/02/14
20 @SquirrelJMEVendorApi
21 public final class Vibration
23 /**
24 * Not used.
26 * @since 2022/02/14
28 private Vibration()
32 /**
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
40 * controlled.
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.
50 * @since 2022/02/14
52 @SquirrelJMEVendorApi
53 public static boolean vibrate(int __d)
54 throws IllegalArgumentException
56 /* {@squirreljme.error EB1n Cannot vibrate for a negative duration.} */
57 if (__d < 0)
58 throw new IllegalArgumentException("EB1n");
60 Debugging.todoNote("Vibration?");
61 return false;