/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/ |
H A D | VibrationScalerTest.java | 35 import android.os.Vibrator; 106 Vibrator.VIBRATION_INTENSITY_HIGH); in testGetExternalVibrationScale() 116 Vibrator.VIBRATION_INTENSITY_LOW); in testGetExternalVibrationScale() 129 Vibrator.VIBRATION_INTENSITY_OFF); in testGetExternalVibrationScale() 138 Vibrator.VIBRATION_INTENSITY_HIGH); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings() 152 Vibrator.VIBRATION_INTENSITY_LOW); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings() 157 Vibrator.VIBRATION_INTENSITY_OFF); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings() 180 Vibrator.VIBRATION_INTENSITY_LOW); in scale_withPrebakedEffect_setsEffectStrengthBasedOnSettings() 186 Vibrator.VIBRATION_INTENSITY_OFF); in scale_withPrebakedEffect_setsEffectStrengthBasedOnSettings() 198 Vibrator.VIBRATION_INTENSITY_LOW); in scale_withOneShotAndWaveform_resolvesAmplitude() [all …]
|
H A D | VibrationSettingsTest.java | 44 import android.os.Vibrator; 133 Vibrator.VIBRATION_INTENSITY_OFF); in addListener_settingsChangeTriggerListener() 135 Vibrator.VIBRATION_INTENSITY_OFF); in addListener_settingsChangeTriggerListener() 137 Vibrator.VIBRATION_INTENSITY_OFF); in addListener_settingsChangeTriggerListener() 332 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_beforeSystemReady_returnsMediumToAllExceptAlarm() 334 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_beforeSystemReady_returnsMediumToAllExceptAlarm() 336 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_beforeSystemReady_returnsMediumToAllExceptAlarm() 363 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_returnsIntensityFromVibratorService() 365 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_returnsIntensityFromVibratorService() 367 Vibrator.VIBRATION_INTENSITY_OFF); in getDefaultIntensity_returnsIntensityFromVibratorService() [all …]
|
H A D | FakeVibrator.java | 21 import android.os.Vibrator; 26 final class FakeVibrator extends Vibrator { 28 private int mDefaultHapticFeedbackIntensity = Vibrator.VIBRATION_INTENSITY_MEDIUM; 29 private int mDefaultNotificationIntensity = Vibrator.VIBRATION_INTENSITY_MEDIUM; 30 private int mDefaultRingIntensity = Vibrator.VIBRATION_INTENSITY_MEDIUM;
|
/aosp12/hardware/google/pixel/vibrator/cs40l25/tests/ |
H A D | test-hwapi.cpp | 121 std::unique_ptr<Vibrator::HwApi> mHwApi; 122 std::unique_ptr<Vibrator::HwApi> mNoApi; 141 using HasTest = HwApiTypedTest<bool(Vibrator::HwApi &)>; 162 HasTest::MakeParam("device/pwle", &Vibrator::HwApi::hasPwle), 166 using GetBoolTest = HwApiTypedTest<bool(Vibrator::HwApi &, bool *)>; 209 using GetUint32Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint32_t *)>; 243 using SetBoolTest = HwApiTypedTest<bool(Vibrator::HwApi &, bool)>; 282 using SetUint32Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint32_t)>; 311 &Vibrator::HwApi::setEffectIndex), 315 &Vibrator::HwApi::setGpioFallIndex), [all …]
|
/aosp12/hardware/interfaces/vibrator/1.3/example/ |
H A D | Vibrator.cpp | 32 Vibrator::Vibrator() { in Vibrator() function in android::hardware::vibrator::V1_3::implementation::Vibrator 46 Return<Status> Vibrator::on(uint32_t timeoutMs) { in on() 50 Return<Status> Vibrator::off() { in off() 54 Return<bool> Vibrator::supportsAmplitudeControl() { in supportsAmplitudeControl() 58 Return<Status> Vibrator::setAmplitude(uint8_t amplitude) { in setAmplitude() 87 Return<bool> Vibrator::supportsExternalControl() { in supportsExternalControl() 145 Status Vibrator::enable(bool enabled) { in enable() 156 Status Vibrator::activate(uint32_t ms) { in activate() 189 void Vibrator::timeout() { in timeout() 202 void Vibrator::timerCallback(union sigval sigval) { in timerCallback() [all …]
|
/aosp12/hardware/google/pixel/vibrator/drv2624/ |
H A D | Vibrator.cpp | 65 Vibrator::Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal) in Vibrator() function in aidl::android::hardware::vibrator::Vibrator 114 ndk::ScopedAStatus Vibrator::getCapabilities(int32_t *_aidl_return) { in getCapabilities() 124 ndk::ScopedAStatus Vibrator::on(uint32_t timeoutMs, const char mode[], in on() 155 ndk::ScopedAStatus Vibrator::on(int32_t timeoutMs, in on() 164 ndk::ScopedAStatus Vibrator::off() { in off() 173 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() 189 ndk::ScopedAStatus Vibrator::setExternalControl(bool enabled) { in setExternalControl() 372 ndk::ScopedAStatus Vibrator::alwaysOnDisable(int32_t id) { in alwaysOnDisable() 390 ndk::ScopedAStatus Vibrator::getSupportedPrimitives( in getSupportedPrimitives() 405 ndk::ScopedAStatus Vibrator::getResonantFrequency(float *resonantFreqHz) { in getResonantFrequency() [all …]
|
H A D | service.cpp | 25 using aidl::android::hardware::vibrator::Vibrator; 35 std::shared_ptr<Vibrator> vib = in main() 36 ndk::SharedRefBase::make<Vibrator>(std::move(hwapi), std::make_unique<HwCal>()); in main() 38 const std::string instance = std::string() + Vibrator::descriptor + "/default"; in main()
|
/aosp12/hardware/google/pixel/vibrator/drv2624/tests/ |
H A D | test-hwapi.cpp | 134 std::unique_ptr<Vibrator::HwApi> mHwApi; 135 std::unique_ptr<Vibrator::HwApi> mNoApi; 194 using HasTest = HwApiTypedTest<bool(Vibrator::HwApi &)>; 213 &Vibrator::HwApi::hasRtpInput), 217 using SetBoolTest = HwApiTypedTest<bool(Vibrator::HwApi &, bool)>; 261 using SetInt8Test = HwApiTypedTest<bool(Vibrator::HwApi &, int8_t)>; 294 using SetUint8Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint8_t)>; 328 using SetUint32Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint32_t)>; 360 &Vibrator::HwApi::setLpTriggerEffect), 362 &Vibrator::HwApi::setLraWaveShape), [all …]
|
/aosp12/hardware/interfaces/vibrator/aidl/default/ |
H A D | Vibrator.cpp | 40 ndk::ScopedAStatus Vibrator::getCapabilities(int32_t* _aidl_return) { in getCapabilities() 51 ndk::ScopedAStatus Vibrator::off() { in off() 56 ndk::ScopedAStatus Vibrator::on(int32_t timeoutMs, in on() 72 ndk::ScopedAStatus Vibrator::perform(Effect effect, EffectStrength strength, in perform() 105 ndk::ScopedAStatus Vibrator::setAmplitude(float amplitude) { in setAmplitude() 113 ndk::ScopedAStatus Vibrator::setExternalControl(bool enabled) { in setExternalControl() 118 ndk::ScopedAStatus Vibrator::getCompositionDelayMax(int32_t* maxDelayMs) { in getCompositionDelayMax() 123 ndk::ScopedAStatus Vibrator::getCompositionSizeMax(int32_t* maxSize) { in getCompositionSizeMax() 216 ndk::ScopedAStatus Vibrator::alwaysOnDisable(int32_t id) { in alwaysOnDisable() 226 ndk::ScopedAStatus Vibrator::getQFactor(float *qFactor) { in getQFactor() [all …]
|
H A D | main.cpp | 24 using aidl::android::hardware::vibrator::Vibrator; 31 auto vib = ndk::SharedRefBase::make<Vibrator>(); in main() 32 const std::string vibName = std::string() + Vibrator::descriptor + "/default"; in main() 37 auto managedVib = ndk::SharedRefBase::make<Vibrator>(); in main()
|
/aosp12/hardware/google/pixel/vibrator/cs40l25/ |
H A D | Vibrator.cpp | 146 void Vibrator::createPwleMaxLevelLimitMap() { in createPwleMaxLevelLimitMap() 148 Vibrator::getCapabilities(&capabilities); in createPwleMaxLevelLimitMap() 192 Vibrator::Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal) in Vibrator() function in aidl::android::hardware::vibrator::Vibrator 285 ndk::ScopedAStatus Vibrator::off() { in off() 575 Vibrator::getCapabilities(&capabilities); in getFrequencyResolution() 586 Vibrator::getCapabilities(&capabilities); in getFrequencyMinimum() 598 Vibrator::getCapabilities(&capabilities); in getBandwidthAmplitudeMap() 610 Vibrator::getCapabilities(&capabilities); in getPwlePrimitiveDurationMax() 621 Vibrator::getCapabilities(&capabilities); in getPwleCompositionSizeMax() 814 bool Vibrator::isUnderExternalControl() { in isUnderExternalControl() [all …]
|
/aosp12/hardware/interfaces/vibrator/1.0/default/ |
H A D | Vibrator.cpp | 34 Vibrator::Vibrator(vibrator_device_t *device) : mDevice(device) {} in Vibrator() function in android::hardware::vibrator::V1_0::implementation::Vibrator 37 Return<Status> Vibrator::on(uint32_t timeout_ms) { in on() 46 Return<Status> Vibrator::off() { in off() 55 Return<bool> Vibrator::supportsAmplitudeControl() { in supportsAmplitudeControl() 59 Return<Status> Vibrator::setAmplitude(uint8_t) { in setAmplitude() 63 Return<void> Vibrator::perform(Effect, EffectStrength, perform_cb _hidl_cb) { in perform() 83 return new Vibrator(vib_device); in HIDL_FETCH_IVibrator()
|
/aosp12/hardware/google/pixel/vibrator/cs40l26/ |
H A D | Vibrator.cpp | 216 Vibrator::Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal) in Vibrator() function in aidl::android::hardware::vibrator::Vibrator 387 ndk::ScopedAStatus Vibrator::off() { in off() 712 Vibrator::getCapabilities(&capabilities); in getFrequencyResolution() 723 Vibrator::getCapabilities(&capabilities); in getFrequencyMinimum() 735 Vibrator::getCapabilities(&capabilities); in getBandwidthAmplitudeMap() 747 Vibrator::getCapabilities(&capabilities); in getPwlePrimitiveDurationMax() 758 Vibrator::getCapabilities(&capabilities); in getPwleCompositionSizeMax() 769 Vibrator::getCapabilities(&capabilities); in getSupportedBraking() 834 Vibrator::getCapabilities(&capabilities); in composePwle() 931 bool Vibrator::isUnderExternalControl() { in isUnderExternalControl() [all …]
|
/aosp12/packages/apps/Settings/src/com/android/settings/accessibility/ |
H A D | VibrationIntensityPreferenceController.java | 24 import android.os.Vibrator; 39 protected final Vibrator mVibrator; 50 mVibrator = mContext.getSystemService(Vibrator.class); in VibrationIntensityPreferenceController() 93 return getIntensityString(mContext, enabled ? intensity : Vibrator.VIBRATION_INTENSITY_OFF); in getSummary() 101 case Vibrator.VIBRATION_INTENSITY_OFF: in getIntensityString() 103 case Vibrator.VIBRATION_INTENSITY_LOW: in getIntensityString() 105 case Vibrator.VIBRATION_INTENSITY_MEDIUM: in getIntensityString() 107 case Vibrator.VIBRATION_INTENSITY_HIGH: in getIntensityString() 113 if (intensity == Vibrator.VIBRATION_INTENSITY_OFF) { in getIntensityString()
|
H A D | VibrationPreferenceFragment.java | 18 import static android.os.Vibrator.VibrationIntensity; 27 import android.os.Vibrator; 86 Vibrator.VIBRATION_INTENSITY_OFF)); in loadCandidates() 90 Vibrator.VIBRATION_INTENSITY_LOW)); in loadCandidates() 94 Vibrator.VIBRATION_INTENSITY_MEDIUM)); in loadCandidates() 98 Vibrator.VIBRATION_INTENSITY_HIGH)); in loadCandidates() 102 R.string.switch_off_text, Vibrator.VIBRATION_INTENSITY_OFF)); in loadCandidates() 114 boolean vibrationEnabled = candidate.getIntensity() != Vibrator.VIBRATION_INTENSITY_OFF; in updateSettings() 187 Vibrator vibrator = getContext().getSystemService(Vibrator.class); in playVibrationPreview() 220 vibrationIntensity = Vibrator.VIBRATION_INTENSITY_OFF; in getDefaultKey() [all …]
|
H A D | VibrationPreferenceController.java | 20 import android.os.Vibrator; 28 private final Vibrator mVibrator; 32 mVibrator = mContext.getSystemService(Vibrator.class); in VibrationPreferenceController() 48 ringIntensity = Vibrator.VIBRATION_INTENSITY_OFF; in getSummary() 65 touchIntensity = Vibrator.VIBRATION_INTENSITY_OFF; in getSummary()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
H A D | VibrationPreferenceControllerTest.java | 22 import android.os.Vibrator; 58 Settings.System.RING_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in getSummary_disabledVibration_shouldReturnOffSummary() 60 Settings.System.NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in getSummary_disabledVibration_shouldReturnOffSummary() 62 Settings.System.HAPTIC_FEEDBACK_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in getSummary_disabledVibration_shouldReturnOffSummary() 71 Settings.System.RING_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_MEDIUM); in getSummary_enabledSomeVibration_shouldReturnVibrationOnSummary() 75 Settings.System.NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in getSummary_enabledSomeVibration_shouldReturnVibrationOnSummary() 77 Settings.System.HAPTIC_FEEDBACK_INTENSITY, Vibrator.VIBRATION_INTENSITY_MEDIUM); in getSummary_enabledSomeVibration_shouldReturnVibrationOnSummary()
|
H A D | NotificationVibrationIntensityPreferenceControllerTest.java | 28 import android.os.Vibrator; 97 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_LOW); in updateState_withMultipleIntensitySuport_shouldRefreshSummary() 103 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_HIGH); in updateState_withMultipleIntensitySuport_shouldRefreshSummary() 109 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_MEDIUM); in updateState_withMultipleIntensitySuport_shouldRefreshSummary() 115 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in updateState_withMultipleIntensitySuport_shouldRefreshSummary() 127 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_LOW); in updateState_withoutMultipleIntensitySupport_shouldRefreshSummary() 133 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_HIGH); in updateState_withoutMultipleIntensitySupport_shouldRefreshSummary() 139 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_MEDIUM); in updateState_withoutMultipleIntensitySupport_shouldRefreshSummary() 145 NOTIFICATION_VIBRATION_INTENSITY, Vibrator.VIBRATION_INTENSITY_OFF); in updateState_withoutMultipleIntensitySupport_shouldRefreshSummary()
|
H A D | VibrationPreferenceFragmentTest.java | 33 import android.os.Vibrator; 59 INTENSITY_TO_KEY.put(Vibrator.VIBRATION_INTENSITY_OFF, KEY_INTENSITY_OFF); in INTENSITY_TO_KEY.put() 60 INTENSITY_TO_KEY.put(Vibrator.VIBRATION_INTENSITY_LOW, KEY_INTENSITY_LOW); in INTENSITY_TO_KEY.put() 61 INTENSITY_TO_KEY.put(Vibrator.VIBRATION_INTENSITY_MEDIUM, KEY_INTENSITY_MEDIUM); in INTENSITY_TO_KEY.put() 62 INTENSITY_TO_KEY.put(Vibrator.VIBRATION_INTENSITY_HIGH, KEY_INTENSITY_HIGH); in INTENSITY_TO_KEY.put() 103 final String expectedKey = intensity == Vibrator.VIBRATION_INTENSITY_OFF in changeIntensitySetting_WithoutMultipleIntensitySupport_shouldResultInOn() 170 return Vibrator.VIBRATION_INTENSITY_MEDIUM; in getDefaultVibrationIntensity()
|
/aosp12/packages/apps/DeskClock/src/com/android/deskclock/alarms/ |
H A D | AlarmKlaxon.kt | 23 import android.os.Vibrator 48 (context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator).cancel() 64 val vibrator: Vibrator = getVibrator(context) 76 private fun vibrateLOrLater(vibrator: Vibrator) { 83 private fun getVibrator(context: Context): Vibrator { 84 return context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
|
/aosp12/packages/apps/DeskClock/src/com/android/deskclock/timer/ |
H A D | TimerKlaxon.kt | 24 import android.os.Vibrator 46 (context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator).cancel() 78 private fun vibrateLOrLater(vibrator: Vibrator) { 85 private fun getVibrator(context: Context): Vibrator { 86 return context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator
|
/aosp12/hardware/interfaces/tests/extension/vibrator/aidl/default/ |
H A D | service.cpp | 25 using aidl::android::hardware::vibrator::Vibrator; 33 std::shared_ptr<Vibrator> vib = ndk::SharedRefBase::make<Vibrator>(); in main() 42 const std::string instance = std::string() + Vibrator::descriptor + "/default"; in main()
|
/aosp12/frameworks/base/core/java/android/os/ |
H A D | SystemVibratorManager.java | 48 private final SparseArray<Vibrator> mVibrators = new SparseArray<>(); 51 private final ArrayMap<Vibrator.OnVibratorStateChangedListener, 86 public Vibrator getVibrator(int vibratorId) { in getVibrator() 88 Vibrator vibrator = mVibrators.get(vibratorId); in getVibrator() 114 public Vibrator getDefaultVibrator() { in getDefaultVibrator() 115 return mContext.getSystemService(Vibrator.class); in getDefaultVibrator() 173 private final Vibrator.OnVibratorStateChangedListener mListener; 176 @NonNull Vibrator.OnVibratorStateChangedListener listener, in OnVibratorStateChangedListenerDelegate() 189 private final class SingleVibrator extends Vibrator {
|
/aosp12/frameworks/base/services/core/java/com/android/server/vibrator/ |
H A D | VibrationSettings.java | 38 import android.os.Vibrator; 79 private Vibrator mVibrator; 144 mVibrator = mContext.getSystemService(Vibrator.class); in onSystemReady() 236 return Vibrator.VIBRATION_INTENSITY_HIGH; in getDefaultIntensity() 249 return Vibrator.VIBRATION_INTENSITY_MEDIUM; in getDefaultIntensity() 267 return Vibrator.VIBRATION_INTENSITY_HIGH; in getCurrentIntensity() 269 return Vibrator.VIBRATION_INTENSITY_MEDIUM; in getCurrentIntensity() 437 case Vibrator.VIBRATION_INTENSITY_OFF: in intensityToString() 439 case Vibrator.VIBRATION_INTENSITY_LOW: in intensityToString() 441 case Vibrator.VIBRATION_INTENSITY_MEDIUM: in intensityToString() [all …]
|
/aosp12/packages/modules/StatsD/tests/apps/statsdapp/src/com/android/server/cts/device/statsd/ |
H A D | Checkers.java | 22 import android.os.Vibrator; 36 Vibrator v = InstrumentationRegistry.getContext().getSystemService(Vibrator.class); in checkVibratorSupported()
|