1 /* 2 * Copyright 2021 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.filter; 18 19 import android.annotation.NonNull; 20 import android.annotation.SuppressLint; 21 import android.annotation.SystemApi; 22 23 /** 24 * Callback interface for receiving information from the corresponding shared filters. 25 * 26 * @hide 27 */ 28 @SystemApi 29 public interface SharedFilterCallback { 30 /** 31 * Invoked when there are filter events. 32 * 33 * @param sharedfilter the corresponding shared filter which sent the events. 34 * @param events the filter events sent from the filter. 35 */ onFilterEvent(@onNull SharedFilter sharedfilter, @SuppressLint("ArrayReturn") @NonNull FilterEvent[] events)36 void onFilterEvent(@NonNull SharedFilter sharedfilter, 37 @SuppressLint("ArrayReturn") @NonNull FilterEvent[] events); 38 /** 39 * Invoked when filter status changed. 40 * 41 * @param sharedfilter the corresponding shared filter whose status is changed. 42 * @param status the new status of the filter. 43 */ onFilterStatusChanged(@onNull SharedFilter sharedfilter, @Filter.Status int status)44 void onFilterStatusChanged(@NonNull SharedFilter sharedfilter, @Filter.Status int status); 45 } 46