• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (c) 2024, 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 package android.os.vibrator;
17 
18 import android.os.vibrator.IVibrationSession;
19 
20 /**
21  * Callback for vibration session state.
22  * {@hide}
23  */
24 oneway interface IVibrationSessionCallback {
25 
26     /**
27      * A method called by the service after a vibration session has successfully started. After this
28      * is called the app has control over the vibrator through this given session.
29      */
onStarted(in IVibrationSession session)30     void onStarted(in IVibrationSession session);
31 
32     /**
33      * A method called by the service to indicate the session is ending and should no longer receive
34      * vibration requests.
35      */
onFinishing()36     void onFinishing();
37 
38     /**
39      * A method called by the service after the session has ended. This might be triggered by the
40      * app or the service. The status code indicates the end reason.
41      */
onFinished(int status)42     void onFinished(int status);
43 }
44