1/* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package android.hardware.vibrator@1.1; 18 19import @1.0::EffectStrength; 20import @1.0::IVibrator; 21import @1.0::Status; 22 23interface IVibrator extends @1.0::IVibrator { 24 /** 25 * Fire off a predefined haptic event. 26 * 27 * @param event The type of haptic event to trigger. 28 * @return status Whether the effect was successfully performed or not. Must 29 * return Status::UNSUPPORTED_OPERATION is the effect is not 30 * supported. 31 * @return lengthMs The length of time the event is expected to take in 32 * milliseconds. This doesn't need to be perfectly accurate, 33 * but should be a reasonable approximation. Should be a 34 * positive, non-zero value if the returned status is 35 * Status::OK, and set to 0 otherwise. 36 */ 37 perform_1_1(Effect_1_1 effect, EffectStrength strength) 38 generates (Status status, uint32_t lengthMs); 39}; 40