Add FX_KEYPRESS_INVALID constant to AudioManager.

Add FX_KEYPRESS_INVALID constant to AudioManager. This is a sound which should
play if the user tries to click or press on an element which is disabled.

Change-Id: Idd8953abeddd1afb51f7f190f9fb612ef672defa
This commit is contained in:
Justin Koh
2013-07-11 17:16:53 -07:00
parent 5bc32b347f
commit cacfe69b68
7 changed files with 12 additions and 1 deletions

View File

@ -1659,10 +1659,16 @@ public class AudioManager {
* @see #playSoundEffect(int)
*/
public static final int FX_KEYPRESS_RETURN = 8;
/**
* Invalid keypress sound
* @see #playSoundEffect(int)
*/
public static final int FX_KEYPRESS_INVALID = 9;
/**
* @hide Number of sound effects
*/
public static final int NUM_SOUND_EFFECTS = 9;
public static final int NUM_SOUND_EFFECTS = 10;
/**
* Plays a sound effect (Key clicks, lid open/close...)
@ -1676,6 +1682,7 @@ public class AudioManager {
* {@link #FX_KEYPRESS_SPACEBAR},
* {@link #FX_KEYPRESS_DELETE},
* {@link #FX_KEYPRESS_RETURN},
* {@link #FX_KEYPRESS_INVALID},
* NOTE: This version uses the UI settings to determine
* whether sounds are heard or not.
*/
@ -1708,6 +1715,7 @@ public class AudioManager {
* {@link #FX_KEYPRESS_SPACEBAR},
* {@link #FX_KEYPRESS_DELETE},
* {@link #FX_KEYPRESS_RETURN},
* {@link #FX_KEYPRESS_INVALID},
* @param volume Sound effect volume.
* The volume value is a raw scalar so UI controls should be scaled logarithmically.
* If a volume of -1 is specified, the AudioManager.STREAM_MUSIC stream volume minus 3dB will be used.