• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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.media.tv.tuner.frontend;
18 
19 import android.annotation.IntDef;
20 import android.annotation.SystemApi;
21 import android.hardware.tv.tuner.V1_0.Constants;
22 
23 import java.lang.annotation.Retention;
24 import java.lang.annotation.RetentionPolicy;
25 
26 /**
27  * Listens for tune events.
28  *
29  * @hide
30  */
31 @SystemApi
32 public interface OnTuneEventListener {
33 
34     /** @hide */
35     @IntDef(prefix = "SIGNAL_", value = {SIGNAL_LOCKED, SIGNAL_NO_SIGNAL, SIGNAL_LOST_LOCK})
36     @Retention(RetentionPolicy.SOURCE)
37     @interface TuneEvent {}
38 
39     /** The frontend has locked to the signal specified by the tune method. */
40     int SIGNAL_LOCKED = Constants.FrontendEventType.LOCKED;
41     /** The frontend is unable to lock to the signal specified by the tune method. */
42     int SIGNAL_NO_SIGNAL = Constants.FrontendEventType.NO_SIGNAL;
43     /** The frontend has lost the lock to the signal specified by the tune method. */
44     int SIGNAL_LOST_LOCK = Constants.FrontendEventType.LOST_LOCK;
45 
46     /** Tune Event from the frontend */
onTuneEvent(@uneEvent int tuneEvent)47     void onTuneEvent(@TuneEvent int tuneEvent);
48 }
49