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 com.android.car.radio.service; 18 19 import android.hardware.radio.RadioManager; 20 21 /** 22 * Watches current program changes. 23 */ 24 oneway interface IRadioAppCallback { 25 /** 26 * Called when hardware error has occured. 27 * 28 * Client must unbind from the {@link RadioAppService} after getting this callback. 29 */ onHardwareError()30 void onHardwareError(); 31 32 /** 33 * Called when current program details changes. 34 * 35 * This might happen as a result of tuning to a different program or just metadata change. 36 * 37 * @param info Current program info 38 */ onCurrentProgramChanged(in RadioManager.ProgramInfo info)39 void onCurrentProgramChanged(in RadioManager.ProgramInfo info); 40 41 /** 42 * Called when playback state (play/pause) changes. 43 * 44 * @param state New playback state 45 */ onPlaybackStateChanged(int state)46 void onPlaybackStateChanged(int state); 47 48 /** 49 * Called when program list changes. 50 * 51 * @param New program list 52 */ onProgramListChanged(in List<RadioManager.ProgramInfo> plist)53 void onProgramListChanged(in List<RadioManager.ProgramInfo> plist); 54 } 55