IAudioService.aidl revision 098d580cc2bb6c0891c756a4e5230c6c6b0d2376
1/* 2 * Copyright (C) 2007 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 17package android.media; 18 19import android.app.PendingIntent; 20import android.content.ComponentName; 21import android.media.IAudioFocusDispatcher; 22import android.media.IRemoteControlClient; 23import android.media.IRemoteControlDisplay; 24import android.media.IRingtonePlayer; 25import android.net.Uri; 26 27/** 28 * {@hide} 29 */ 30interface IAudioService { 31 32 void adjustVolume(int direction, int flags); 33 34 void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags); 35 36 void adjustStreamVolume(int streamType, int direction, int flags); 37 38 void adjustMasterVolume(int direction, int flags); 39 40 void setStreamVolume(int streamType, int index, int flags); 41 42 void setMasterVolume(int index, int flags); 43 44 void setStreamSolo(int streamType, boolean state, IBinder cb); 45 46 void setStreamMute(int streamType, boolean state, IBinder cb); 47 48 boolean isStreamMute(int streamType); 49 50 void setMasterMute(boolean state, int flags, IBinder cb); 51 52 boolean isMasterMute(); 53 54 int getStreamVolume(int streamType); 55 56 int getMasterVolume(); 57 58 int getStreamMaxVolume(int streamType); 59 60 int getMasterMaxVolume(); 61 62 int getLastAudibleStreamVolume(int streamType); 63 64 int getLastAudibleMasterVolume(); 65 66 void setRingerMode(int ringerMode); 67 68 int getRingerMode(); 69 70 void setVibrateSetting(int vibrateType, int vibrateSetting); 71 72 int getVibrateSetting(int vibrateType); 73 74 boolean shouldVibrate(int vibrateType); 75 76 void setMode(int mode, IBinder cb); 77 78 int getMode(); 79 80 oneway void playSoundEffect(int effectType); 81 82 oneway void playSoundEffectVolume(int effectType, float volume); 83 84 boolean loadSoundEffects(); 85 86 oneway void unloadSoundEffects(); 87 88 oneway void reloadAudioSettings(); 89 90 void setSpeakerphoneOn(boolean on); 91 92 boolean isSpeakerphoneOn(); 93 94 void setBluetoothScoOn(boolean on); 95 96 boolean isBluetoothScoOn(); 97 98 int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l, 99 String clientId, String callingPackageName); 100 101 int abandonAudioFocus(IAudioFocusDispatcher l, String clientId); 102 103 void unregisterAudioFocusClient(String clientId); 104 105 oneway void registerMediaButtonIntent(in PendingIntent pi, in ComponentName c); 106 oneway void unregisterMediaButtonIntent(in PendingIntent pi, in ComponentName c); 107 108 oneway void registerRemoteControlClient(in PendingIntent mediaIntent, 109 in IRemoteControlClient rcClient, in String callingPackageName); 110 oneway void unregisterRemoteControlClient(in PendingIntent mediaIntent, 111 in IRemoteControlClient rcClient); 112 113 oneway void registerRemoteControlDisplay(in IRemoteControlDisplay rcd); 114 oneway void unregisterRemoteControlDisplay(in IRemoteControlDisplay rcd); 115 oneway void remoteControlDisplayUsesBitmapSize(in IRemoteControlDisplay rcd, int w, int h); 116 117 void startBluetoothSco(IBinder cb); 118 void stopBluetoothSco(IBinder cb); 119 120 void forceVolumeControlStream(int streamType, IBinder cb); 121 122 void setRingtonePlayer(IRingtonePlayer player); 123 IRingtonePlayer getRingtonePlayer(); 124 int getMasterStreamType(); 125} 126