mt6735 fm在播放时如何实现耳机 、蓝牙耳机的后插优先
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
fm在播放时由蓝牙耳机优先改成耳机和蓝牙耳机的后插优先
[SOLUTION]
在
vendor\mediatek\proprietary\packages\apps\FmRadio\src\com\mediatek\fmradio
\FmRadioService.java的
onCreate()的"setSpeakerPhoneOn(mIsSpeakerUsed);"的代码修改如下:
int devices = AudioSystem.getDevicesForStream(AudioManager.STREAM_MUSIC);
Log.e(TAG, “devices = ” + devices);
if(!( (devices==AudioSystem.DEVICE_OUT_WIRED_HEADSET) ||
(devices==AudioSystem.DEVICE_OUT_WIRED_HEADPHONE)) )
setSpeakerPhoneOn(mIsSpeakerUsed);
fm在播放时由蓝牙耳机优先改成耳机和蓝牙耳机的后插优先
[SOLUTION]
在
vendor\mediatek\proprietary\packages\apps\FmRadio\src\com\mediatek\fmradio
\FmRadioService.java的
onCreate()的"setSpeakerPhoneOn(mIsSpeakerUsed);"的代码修改如下:
int devices = AudioSystem.getDevicesForStream(AudioManager.STREAM_MUSIC);
Log.e(TAG, “devices = ” + devices);
if(!( (devices==AudioSystem.DEVICE_OUT_WIRED_HEADSET) ||
(devices==AudioSystem.DEVICE_OUT_WIRED_HEADPHONE)) )
setSpeakerPhoneOn(mIsSpeakerUsed);