Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -35198,6 +35198,7 @@ package android.os { field public static final int USAGE_CLASS_MEDIA = 3; // 0x3 field public static final int USAGE_CLASS_UNKNOWN = 0; // 0x0 field public static final int USAGE_COMMUNICATION_REQUEST = 65; // 0x41 field @FlaggedApi("android.os.vibrator.haptic_feedback_with_custom_usage") public static final int USAGE_GESTURE_INPUT = 98; // 0x62 field public static final int USAGE_HARDWARE_FEEDBACK = 50; // 0x32 field @FlaggedApi("android.os.vibrator.vibration_attribute_ime_usage_api") public static final int USAGE_IME_FEEDBACK = 82; // 0x52 field public static final int USAGE_MEDIA = 19; // 0x13 core/java/android/os/VibrationAttributes.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.os; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_VIBRATION_ATTRIBUTE_IME_USAGE_API; import android.annotation.FlaggedApi; Loading Loading @@ -59,6 +60,7 @@ public final class VibrationAttributes implements Parcelable { USAGE_RINGTONE, USAGE_TOUCH, USAGE_IME_FEEDBACK, USAGE_GESTURE_INPUT, }) @Retention(RetentionPolicy.SOURCE) public @interface Usage {} Loading Loading @@ -144,6 +146,21 @@ public final class VibrationAttributes implements Parcelable { */ @FlaggedApi(FLAG_VIBRATION_ATTRIBUTE_IME_USAGE_API) public static final int USAGE_IME_FEEDBACK = 0x50 | USAGE_CLASS_FEEDBACK; /** * Usage value to use for vibrations performed as feedback for a user's gesture input. * * <p>A gesture input is broadly defined as a user input that falls outside the direct * usage of a physical {@link InputDevice}. Note that the gesture input may involve interacting * with an {@link InputDevice}, but the input itself is a user gesture that is not a direct * application of the {@link InputDevice}. * * <p>The exact definition of a gesture input varies across form-factors and input modalities. * For example, on Wearable devices, it could be a hand-based gesture provided by the user * without touching any physical {@link InputDevice}. Another example is a pinch gesture on a * touchscreen. */ @FlaggedApi(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE) public static final int USAGE_GESTURE_INPUT = 0x60 | USAGE_CLASS_FEEDBACK; /** * Usage value to use for media vibrations, such as music, movie, soundtrack, animations, games, Loading Loading @@ -396,6 +413,8 @@ public final class VibrationAttributes implements Parcelable { return "HARDWARE_FEEDBACK"; case USAGE_IME_FEEDBACK: return "IME"; case USAGE_GESTURE_INPUT: return "GESTURE_INPUT"; default: return "unknown usage " + usage; } Loading core/java/android/os/vibrator/VibrationConfig.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.os.vibrator; import static android.os.VibrationAttributes.USAGE_ACCESSIBILITY; import static android.os.VibrationAttributes.USAGE_ALARM; import static android.os.VibrationAttributes.USAGE_COMMUNICATION_REQUEST; import static android.os.VibrationAttributes.USAGE_GESTURE_INPUT; import static android.os.VibrationAttributes.USAGE_HARDWARE_FEEDBACK; import static android.os.VibrationAttributes.USAGE_IME_FEEDBACK; import static android.os.VibrationAttributes.USAGE_MEDIA; Loading Loading @@ -273,6 +274,7 @@ public class VibrationConfig { case USAGE_HARDWARE_FEEDBACK: case USAGE_PHYSICAL_EMULATION: case USAGE_ACCESSIBILITY: case USAGE_GESTURE_INPUT: return mDefaultHapticFeedbackIntensity; case USAGE_IME_FEEDBACK: return isKeyboardVibrationSettingsSupported() Loading core/java/android/provider/Settings.java +19 −0 Original line number Diff line number Diff line Loading @@ -5538,6 +5538,25 @@ public final class Settings { public static final String HARDWARE_HAPTIC_FEEDBACK_INTENSITY = "hardware_haptic_feedback_intensity"; /** * The intensity of gesture input vibrations if configurable. See {@link * android.os.VibrationAttributes#USAGE_GESTURE_INPUT} for details about gesture input * vibrations. * * Not all devices are capable of changing their feedback intensity; on these devices * there will likely be no difference between the various vibration intensities except for * intensity 0 (off) and the rest. * * <b>Values:</b><br/> * 0 - Vibration is disabled<br/> * 1 - Weak vibrations<br/> * 2 - Medium vibrations<br/> * 3 - Strong vibrations * @hide */ public static final String GESTURE_INPUT_VIBRATION_INTENSITY = "gesture_input_vibration_intensity"; /** * Whether keyboard vibration feedback is enabled. The value is boolean (1 or 0). * Loading packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class SystemSettings { Settings.System.RING_VIBRATION_INTENSITY, Settings.System.HAPTIC_FEEDBACK_INTENSITY, Settings.System.HARDWARE_HAPTIC_FEEDBACK_INTENSITY, Settings.System.GESTURE_INPUT_VIBRATION_INTENSITY, Settings.System.KEYBOARD_VIBRATION_ENABLED, Settings.System.HAPTIC_FEEDBACK_ENABLED, Settings.System.DISPLAY_COLOR_MODE_VENDOR_HINT, // must precede DISPLAY_COLOR_MODE Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -35198,6 +35198,7 @@ package android.os { field public static final int USAGE_CLASS_MEDIA = 3; // 0x3 field public static final int USAGE_CLASS_UNKNOWN = 0; // 0x0 field public static final int USAGE_COMMUNICATION_REQUEST = 65; // 0x41 field @FlaggedApi("android.os.vibrator.haptic_feedback_with_custom_usage") public static final int USAGE_GESTURE_INPUT = 98; // 0x62 field public static final int USAGE_HARDWARE_FEEDBACK = 50; // 0x32 field @FlaggedApi("android.os.vibrator.vibration_attribute_ime_usage_api") public static final int USAGE_IME_FEEDBACK = 82; // 0x52 field public static final int USAGE_MEDIA = 19; // 0x13
core/java/android/os/VibrationAttributes.java +19 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.os; import static android.os.vibrator.Flags.FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE; import static android.os.vibrator.Flags.FLAG_VIBRATION_ATTRIBUTE_IME_USAGE_API; import android.annotation.FlaggedApi; Loading Loading @@ -59,6 +60,7 @@ public final class VibrationAttributes implements Parcelable { USAGE_RINGTONE, USAGE_TOUCH, USAGE_IME_FEEDBACK, USAGE_GESTURE_INPUT, }) @Retention(RetentionPolicy.SOURCE) public @interface Usage {} Loading Loading @@ -144,6 +146,21 @@ public final class VibrationAttributes implements Parcelable { */ @FlaggedApi(FLAG_VIBRATION_ATTRIBUTE_IME_USAGE_API) public static final int USAGE_IME_FEEDBACK = 0x50 | USAGE_CLASS_FEEDBACK; /** * Usage value to use for vibrations performed as feedback for a user's gesture input. * * <p>A gesture input is broadly defined as a user input that falls outside the direct * usage of a physical {@link InputDevice}. Note that the gesture input may involve interacting * with an {@link InputDevice}, but the input itself is a user gesture that is not a direct * application of the {@link InputDevice}. * * <p>The exact definition of a gesture input varies across form-factors and input modalities. * For example, on Wearable devices, it could be a hand-based gesture provided by the user * without touching any physical {@link InputDevice}. Another example is a pinch gesture on a * touchscreen. */ @FlaggedApi(FLAG_HAPTIC_FEEDBACK_WITH_CUSTOM_USAGE) public static final int USAGE_GESTURE_INPUT = 0x60 | USAGE_CLASS_FEEDBACK; /** * Usage value to use for media vibrations, such as music, movie, soundtrack, animations, games, Loading Loading @@ -396,6 +413,8 @@ public final class VibrationAttributes implements Parcelable { return "HARDWARE_FEEDBACK"; case USAGE_IME_FEEDBACK: return "IME"; case USAGE_GESTURE_INPUT: return "GESTURE_INPUT"; default: return "unknown usage " + usage; } Loading
core/java/android/os/vibrator/VibrationConfig.java +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.os.vibrator; import static android.os.VibrationAttributes.USAGE_ACCESSIBILITY; import static android.os.VibrationAttributes.USAGE_ALARM; import static android.os.VibrationAttributes.USAGE_COMMUNICATION_REQUEST; import static android.os.VibrationAttributes.USAGE_GESTURE_INPUT; import static android.os.VibrationAttributes.USAGE_HARDWARE_FEEDBACK; import static android.os.VibrationAttributes.USAGE_IME_FEEDBACK; import static android.os.VibrationAttributes.USAGE_MEDIA; Loading Loading @@ -273,6 +274,7 @@ public class VibrationConfig { case USAGE_HARDWARE_FEEDBACK: case USAGE_PHYSICAL_EMULATION: case USAGE_ACCESSIBILITY: case USAGE_GESTURE_INPUT: return mDefaultHapticFeedbackIntensity; case USAGE_IME_FEEDBACK: return isKeyboardVibrationSettingsSupported() Loading
core/java/android/provider/Settings.java +19 −0 Original line number Diff line number Diff line Loading @@ -5538,6 +5538,25 @@ public final class Settings { public static final String HARDWARE_HAPTIC_FEEDBACK_INTENSITY = "hardware_haptic_feedback_intensity"; /** * The intensity of gesture input vibrations if configurable. See {@link * android.os.VibrationAttributes#USAGE_GESTURE_INPUT} for details about gesture input * vibrations. * * Not all devices are capable of changing their feedback intensity; on these devices * there will likely be no difference between the various vibration intensities except for * intensity 0 (off) and the rest. * * <b>Values:</b><br/> * 0 - Vibration is disabled<br/> * 1 - Weak vibrations<br/> * 2 - Medium vibrations<br/> * 3 - Strong vibrations * @hide */ public static final String GESTURE_INPUT_VIBRATION_INTENSITY = "gesture_input_vibration_intensity"; /** * Whether keyboard vibration feedback is enabled. The value is boolean (1 or 0). * Loading
packages/SettingsProvider/src/android/provider/settings/backup/SystemSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,7 @@ public class SystemSettings { Settings.System.RING_VIBRATION_INTENSITY, Settings.System.HAPTIC_FEEDBACK_INTENSITY, Settings.System.HARDWARE_HAPTIC_FEEDBACK_INTENSITY, Settings.System.GESTURE_INPUT_VIBRATION_INTENSITY, Settings.System.KEYBOARD_VIBRATION_ENABLED, Settings.System.HAPTIC_FEEDBACK_ENABLED, Settings.System.DISPLAY_COLOR_MODE_VENDOR_HINT, // must precede DISPLAY_COLOR_MODE Loading