1 /* 2 * Copyright (C) 2020 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.platform.helpers; 18 19 public interface IAutoSoundsSettingHelper extends IAppHelper { 20 21 /** enum class for volume types. */ 22 enum VolumeType { 23 MEDIA, 24 ALARM, 25 NAVIGATION, 26 INCALL, 27 NOTIFICATION, 28 RINGTONE 29 } 30 31 /** enum class for sound types. */ 32 enum SoundType { 33 RINGTONE, 34 NOTIFICATION, 35 ALARM 36 } 37 38 /** 39 * Setup expectation: Sound setting is open. 40 * 41 * <p>get volume value. 42 * 43 * @param volumeType type selected. 44 */ getVolume(VolumeType volumeType)45 int getVolume(VolumeType volumeType); 46 47 /** 48 * Setup expectation: Sound setting is open. 49 * 50 * <p>set volume 51 * 52 * @param volumeType type selected 53 * @param index index of sound value. 54 */ setVolume(VolumeType volumeType, int index)55 void setVolume(VolumeType volumeType, int index); 56 57 /** 58 * Setup expectation: Sound setting is open. 59 * 60 * <p>get sound. 61 * 62 * @param soundType type selected. 63 */ getSound(SoundType soundType)64 String getSound(SoundType soundType); 65 66 /** 67 * Setup expectation: Sound setting is open. 68 * 69 * <p>set sound 70 * 71 * @param soundType type selected. 72 * @param sound sound selected. 73 */ setSound(SoundType soundType, String sound)74 void setSound(SoundType soundType, String sound); 75 } 76