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:
@ -11609,6 +11609,7 @@ package android.media {
|
||||
field public static final int FX_FOCUS_NAVIGATION_RIGHT = 4; // 0x4
|
||||
field public static final int FX_FOCUS_NAVIGATION_UP = 1; // 0x1
|
||||
field public static final int FX_KEYPRESS_DELETE = 7; // 0x7
|
||||
field public static final int FX_KEYPRESS_INVALID = 9; // 0x9
|
||||
field public static final int FX_KEYPRESS_RETURN = 8; // 0x8
|
||||
field public static final int FX_KEYPRESS_SPACEBAR = 6; // 0x6
|
||||
field public static final int FX_KEYPRESS_STANDARD = 5; // 0x5
|
||||
|
@ -34,5 +34,6 @@
|
||||
<asset id="FX_KEYPRESS_SPACEBAR" file="KeypressSpacebar.ogg"/>
|
||||
<asset id="FX_KEYPRESS_DELETE" file="KeypressDelete.ogg"/>
|
||||
<asset id="FX_KEYPRESS_RETURN" file="KeypressReturn.ogg"/>
|
||||
<asset id="FX_KEYPRESS_INVALID" file="KeypressInvalid.ogg"/>
|
||||
</group>
|
||||
</audio_assets>
|
||||
|
@ -221,6 +221,7 @@ PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/effects/ogg/KeypressReturn_120_48k.ogg:system/media/audio/ui/KeypressReturn.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/KeypressSpacebar_120_48k.ogg:system/media/audio/ui/KeypressSpacebar.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/KeypressStandard_120_48k.ogg:system/media/audio/ui/KeypressStandard.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/KeypressInvalid_120_48k.ogg:system/media/audio/ui/KeypressInvalid.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/Lock.ogg:system/media/audio/ui/Lock.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/LowBattery.ogg:system/media/audio/ui/LowBattery.ogg \
|
||||
$(LOCAL_PATH)/effects/ogg/Undock.ogg:system/media/audio/ui/Undock.ogg \
|
||||
|
BIN
data/sounds/effects/KeypressInvalid.ogg
Normal file
BIN
data/sounds/effects/KeypressInvalid.ogg
Normal file
Binary file not shown.
BIN
data/sounds/effects/KeypressInvalid.wav
Normal file
BIN
data/sounds/effects/KeypressInvalid.wav
Normal file
Binary file not shown.
BIN
data/sounds/effects/ogg/KeypressInvalid_120_48k.ogg
Normal file
BIN
data/sounds/effects/ogg/KeypressInvalid_120_48k.ogg
Normal file
Binary file not shown.
@ -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.
|
||||
|
Reference in New Issue
Block a user