diff options
-rw-r--r-- | core/jni/android_media_AudioSystem.cpp | 7 | ||||
-rw-r--r-- | include/media/AudioSystem.h | 1 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 1 | ||||
-rw-r--r-- | media/java/android/media/AudioSystem.java | 1 | ||||
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 7 | ||||
-rw-r--r-- | media/libmedia/IAudioPolicyService.cpp | 20 | ||||
-rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 13 | ||||
-rw-r--r-- | services/audioflinger/AudioPolicyService.h | 1 |
8 files changed, 1 insertions, 50 deletions
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp index 5f61e16..6b4c5e8 100644 --- a/core/jni/android_media_AudioSystem.cpp +++ b/core/jni/android_media_AudioSystem.cpp @@ -155,12 +155,6 @@ android_media_AudioSystem_setPhoneState(JNIEnv *env, jobject thiz, jint state) } static int -android_media_AudioSystem_setRingerMode(JNIEnv *env, jobject thiz, jint mode, jint mask) -{ - return check_AudioSystem_Command(AudioSystem::setRingerMode(mode, mask)); -} - -static int android_media_AudioSystem_setForceUse(JNIEnv *env, jobject thiz, jint usage, jint config) { return check_AudioSystem_Command(AudioSystem::setForceUse(static_cast <audio_policy_force_use_t>(usage), @@ -227,7 +221,6 @@ static JNINativeMethod gMethods[] = { {"setDeviceConnectionState", "(IILjava/lang/String;)I", (void *)android_media_AudioSystem_setDeviceConnectionState}, {"getDeviceConnectionState", "(ILjava/lang/String;)I", (void *)android_media_AudioSystem_getDeviceConnectionState}, {"setPhoneState", "(I)I", (void *)android_media_AudioSystem_setPhoneState}, - {"setRingerMode", "(II)I", (void *)android_media_AudioSystem_setRingerMode}, {"setForceUse", "(II)I", (void *)android_media_AudioSystem_setForceUse}, {"getForceUse", "(I)I", (void *)android_media_AudioSystem_getForceUse}, {"initStreamVolume", "(III)I", (void *)android_media_AudioSystem_initStreamVolume}, diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 4415d33..49e5690 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -149,7 +149,6 @@ public: static status_t setDeviceConnectionState(audio_devices_t device, audio_policy_dev_state_t state, const char *device_address); static audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address); static status_t setPhoneState(audio_mode_t state); - static status_t setRingerMode(uint32_t mode, uint32_t mask); static status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config); static audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage); static audio_io_handle_t getOutput(audio_stream_type_t stream, diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index a83d806..8ddbe0a 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -46,7 +46,6 @@ public: virtual audio_policy_dev_state_t getDeviceConnectionState(audio_devices_t device, const char *device_address) = 0; virtual status_t setPhoneState(audio_mode_t state) = 0; - virtual status_t setRingerMode(uint32_t mode, uint32_t mask) = 0; virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) = 0; virtual audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage) = 0; virtual audio_io_handle_t getOutput(audio_stream_type_t stream, diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 81145d3..3080497 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -313,7 +313,6 @@ public class AudioSystem public static native int setDeviceConnectionState(int device, int state, String device_address); public static native int getDeviceConnectionState(int device, String device_address); public static native int setPhoneState(int state); - public static native int setRingerMode(int mode, int mask); public static native int setForceUse(int usage, int config); public static native int getForceUse(int usage); public static native int initStreamVolume(int stream, int indexMin, int indexMax); diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 7379d68..d4ecb3a 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -555,13 +555,6 @@ status_t AudioSystem::setPhoneState(audio_mode_t state) return aps->setPhoneState(state); } -status_t AudioSystem::setRingerMode(uint32_t mode, uint32_t mask) -{ - const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); - if (aps == 0) return PERMISSION_DENIED; - return aps->setRingerMode(mode, mask); -} - status_t AudioSystem::setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); diff --git a/media/libmedia/IAudioPolicyService.cpp b/media/libmedia/IAudioPolicyService.cpp index 6205ebd..e363101 100644 --- a/media/libmedia/IAudioPolicyService.cpp +++ b/media/libmedia/IAudioPolicyService.cpp @@ -33,7 +33,7 @@ enum { SET_DEVICE_CONNECTION_STATE = IBinder::FIRST_CALL_TRANSACTION, GET_DEVICE_CONNECTION_STATE, SET_PHONE_STATE, - SET_RINGER_MODE, + SET_RINGER_MODE, // reserved, no longer used SET_FORCE_USE, GET_FORCE_USE, GET_OUTPUT, @@ -100,16 +100,6 @@ public: return static_cast <status_t> (reply.readInt32()); } - virtual status_t setRingerMode(uint32_t mode, uint32_t mask) - { - Parcel data, reply; - data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor()); - data.writeInt32(mode); - data.writeInt32(mask); - remote()->transact(SET_RINGER_MODE, data, &reply); - return static_cast <status_t> (reply.readInt32()); - } - virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) { Parcel data, reply; @@ -405,14 +395,6 @@ status_t BnAudioPolicyService::onTransact( return NO_ERROR; } break; - case SET_RINGER_MODE: { - CHECK_INTERFACE(IAudioPolicyService, data, reply); - uint32_t mode = data.readInt32(); - uint32_t mask = data.readInt32(); - reply->writeInt32(static_cast <uint32_t>(setRingerMode(mode, mask))); - return NO_ERROR; - } break; - case SET_FORCE_USE: { CHECK_INTERFACE(IAudioPolicyService, data, reply); audio_policy_force_use_t usage = static_cast <audio_policy_force_use_t>(data.readInt32()); diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index ba9f8b0..7a408bc 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -207,19 +207,6 @@ status_t AudioPolicyService::setPhoneState(audio_mode_t state) return NO_ERROR; } -status_t AudioPolicyService::setRingerMode(uint32_t mode, uint32_t mask) -{ - if (mpAudioPolicy == NULL) { - return NO_INIT; - } - if (!checkPermission()) { - return PERMISSION_DENIED; - } - - mpAudioPolicy->set_ringer_mode(mpAudioPolicy, mode, mask); - return NO_ERROR; -} - status_t AudioPolicyService::setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config) { diff --git a/services/audioflinger/AudioPolicyService.h b/services/audioflinger/AudioPolicyService.h index cb8c33f..3693cef 100644 --- a/services/audioflinger/AudioPolicyService.h +++ b/services/audioflinger/AudioPolicyService.h @@ -59,7 +59,6 @@ public: audio_devices_t device, const char *device_address); virtual status_t setPhoneState(audio_mode_t state); - virtual status_t setRingerMode(uint32_t mode, uint32_t mask); virtual status_t setForceUse(audio_policy_force_use_t usage, audio_policy_forced_cfg_t config); virtual audio_policy_forced_cfg_t getForceUse(audio_policy_force_use_t usage); virtual audio_io_handle_t getOutput(audio_stream_type_t stream, |