ed5d92cc7c
Add new effects for pop, thud and heavy click, as well as constants to play back pre-defined ringtone effects. Bug: 64185677 Bug: 64184692 Test: run vts --skip-all-system-status-check --skip-preconditions --primary-abi-only --module VtsHalVibratorV1_2TargetTest Change-Id: I4baae73e1471208f9f54bb1c03da8c27ca6b0ee1
37 lines
1.4 KiB
Text
37 lines
1.4 KiB
Text
/*
|
|
* Copyright (C) 2018 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
package android.hardware.vibrator@1.2;
|
|
|
|
import @1.0::EffectStrength;
|
|
import @1.0::Status;
|
|
import @1.1::IVibrator;
|
|
|
|
interface IVibrator extends @1.1::IVibrator {
|
|
/**
|
|
* Fire off a predefined haptic event.
|
|
*
|
|
* @param event The type of haptic event to trigger.
|
|
* @return status Whether the effect was successfully performed or not. Must
|
|
* return Status::UNSUPPORTED_OPERATION is the effect is not supported.
|
|
* @return lengthMs The length of time the event is expected to take in
|
|
* milliseconds. This doesn't need to be perfectly accurate, but should be a reasonable
|
|
* approximation. Should be a positive, non-zero value if the returned status is Status::OK,
|
|
* and set to 0 otherwise.
|
|
*/
|
|
perform_1_2(Effect effect, EffectStrength strength)
|
|
generates (Status status, uint32_t lengthMs);
|
|
};
|