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 17 package android.hardware.radio; 18 19 import android.hardware.radio.ProgramList; 20 import android.hardware.radio.ProgramSelector; 21 import android.hardware.radio.RadioManager; 22 import android.hardware.radio.RadioMetadata; 23 24 /** {@hide} */ 25 oneway interface ITunerCallback { onError(int status)26 void onError(int status); 27 28 /** 29 * Callback called when tuning operations, such as tune, step, seek, failed. 30 * 31 * @param result Tuning result of {@link RadioTuner#TunerResultType} type. 32 * @param selector Program selector used for the tuning operation. 33 */ onTuneFailed(int result, in ProgramSelector selector)34 void onTuneFailed(int result, in ProgramSelector selector); onConfigurationChanged(in RadioManager.BandConfig config)35 void onConfigurationChanged(in RadioManager.BandConfig config); onCurrentProgramInfoChanged(in RadioManager.ProgramInfo info)36 void onCurrentProgramInfoChanged(in RadioManager.ProgramInfo info); onTrafficAnnouncement(boolean active)37 void onTrafficAnnouncement(boolean active); onEmergencyAnnouncement(boolean active)38 void onEmergencyAnnouncement(boolean active); onAntennaState(boolean connected)39 void onAntennaState(boolean connected); onBackgroundScanAvailabilityChange(boolean isAvailable)40 void onBackgroundScanAvailabilityChange(boolean isAvailable); onBackgroundScanComplete()41 void onBackgroundScanComplete(); onProgramListChanged()42 void onProgramListChanged(); onProgramListUpdated(in ProgramList.Chunk chunk)43 void onProgramListUpdated(in ProgramList.Chunk chunk); 44 45 /** 46 * Callback for passing updates to config flags from {@link IRadioService} to 47 * {@link RadioTuner}. 48 * 49 * @param flag Config flag (defined in {@link RadioManager.ConfigFlag}) updated 50 * @param value Updated value for the config flag 51 */ onConfigFlagUpdated(int flag, boolean value)52 void onConfigFlagUpdated(int flag, boolean value); 53 54 /** 55 * Callback for passing updates to vendor-specific parameter values from 56 * {@link IRadioService} to {@link RadioTuner}. 57 * 58 * @param parameters Vendor-specific key-value pairs 59 */ onParametersUpdated(in Map<String, String> parameters)60 void onParametersUpdated(in Map<String, String> parameters); 61 } 62