Harpreet "Eli" Sangha | 1f15326 | 2018-12-14 12:06:34 +0900 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2018 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 | |
| 17 | package android.hardware.vibrator@1.3; |
| 18 | |
| 19 | import @1.0::Status; |
| 20 | import @1.2::IVibrator; |
| 21 | |
| 22 | interface IVibrator extends @1.2::IVibrator { |
| 23 | /** |
| 24 | * Returns whether the vibrator supports control through an alternate interface. |
| 25 | */ |
| 26 | supportsExternalControl() generates (bool supports); |
| 27 | |
| 28 | /** |
| 29 | * Enables/disables control override of vibrator to audio. |
| 30 | * |
| 31 | * When this API is set, the vibrator control should be ceded to audio system |
| 32 | * for haptic audio. While this is enabled, issuing of other commands to control |
| 33 | * the vibrator is unsupported and the resulting behavior is undefined. Amplitude |
| 34 | * control may or may not be supported and is reflected in the return value of |
| 35 | * supportsAmplitudeControl() while this is enabled. When this is disabled, the |
| 36 | * vibrator should resume to an off state. |
| 37 | * |
| 38 | * @param enabled Whether external control should be enabled or disabled. |
| 39 | * @return status Whether the command was successful or not. Must return |
| 40 | * Status::UNSUPPORTED_OPERATION if external control is |
| 41 | * not supported by the device. |
| 42 | */ |
| 43 | setExternalControl(bool enabled) generates (Status status); |
| 44 | }; |