1 /* 2 * Copyright (C) 2014 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; 18 19 /** 20 * AIDL for the AudioService to report interesting events to a volume control 21 * dialog in another process. 22 * @hide 23 */ 24 oneway interface IVolumeController { 25 displaySafeVolumeWarning(int flags)26 void displaySafeVolumeWarning(int flags); 27 volumeChanged(int streamType, int flags)28 void volumeChanged(int streamType, int flags); 29 masterMuteChanged(int flags)30 void masterMuteChanged(int flags); 31 setLayoutDirection(int layoutDirection)32 void setLayoutDirection(int layoutDirection); 33 dismiss()34 void dismiss(); 35 36 /** 37 * Change the a11y mode. 38 * @param a11yMode one of {@link VolumePolicy#A11Y_MODE_MEDIA_A11Y_VOLUME}, 39 * {@link VolumePolicy#A11Y_MODE_INDEPENDENT_A11Y_VOLUME} 40 */ setA11yMode(int mode)41 void setA11yMode(int mode); 42 43 /** 44 * Display a sound-dose related warning. 45 * This method will never be called if the CSD (Computed Sound Dose) feature is 46 * not enabled. See com.android.android.server.audio.SoundDoseHelper for the state of 47 * the feature. 48 * @param warning the type of warning to display, values are one of 49 * {@link android.media.AudioManager#CSD_WARNING_DOSE_REACHED_1X}, 50 * {@link android.media.AudioManager#CSD_WARNING_DOSE_REPEATED_5X}, 51 * {@link android.media.AudioManager#CSD_WARNING_MOMENTARY_EXPOSURE}, 52 * {@link android.media.AudioManager#CSD_WARNING_ACCUMULATION_START}. 53 * @param displayDurationMs the time expressed in milliseconds after which the dialog will be 54 * automatically dismissed, or -1 if there is no automatic timeout. 55 */ displayCsdWarning(int warning, int displayDurationMs)56 void displayCsdWarning(int warning, int displayDurationMs); 57 } 58