Skip to content
Snippets Groups Projects
Commit 6c52ee08 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge e4e8ad1c on remote branch

Change-Id: I84fa5310ee3247d83aa8339fc7491a239b74e0f3
parents a17a340d e4e8ad1c
Branches
No related tags found
No related merge requests found
...@@ -288,7 +288,16 @@ public class FMRadioService extends Service ...@@ -288,7 +288,16 @@ public class FMRadioService extends Service
getA2dpStatusAtStart(); getA2dpStatusAtStart();
mGainFocusReq = requestAudioFocus(); mGainFocusReq = requestAudioFocus();
AudioManager mAudioManager =
(AudioManager) getSystemService(Context.AUDIO_SERVICE);
AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS);
for (int index = 0; index < deviceList.length; index++) {
if ((deviceList[index].getType() == AudioDeviceInfo.TYPE_WIRED_HEADSET ) ||
(deviceList[index].getType() == AudioDeviceInfo.TYPE_WIRED_HEADPHONES )){
mHeadsetPlugged = true;
break;
}
}
} }
@Override @Override
...@@ -743,7 +752,7 @@ public class FMRadioService extends Service ...@@ -743,7 +752,7 @@ public class FMRadioService extends Service
final Runnable mFmVolumeHandler = new Runnable() { final Runnable mFmVolumeHandler = new Runnable() {
public void run() { public void run() {
try { try {
Thread.sleep(1000); Thread.sleep(1500);
} catch (Exception ex) { } catch (Exception ex) {
Log.d( LOGTAG, "RunningThread InterruptedException"); Log.d( LOGTAG, "RunningThread InterruptedException");
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment