Skip to content
Snippets Groups Projects
Commit 693dc454 authored by juncao's avatar juncao Committed by Gerrit - the friendly Code Review server
Browse files

Change value of mSpeakerPhoneOn when BT becomes on or off


Signed-off-by: default avatarjuncao <juncao@codeaurora.org>

Change-Id: I1dcd614614326bc6fc5da15f8f64ca5312b79da3
CRs-Fixed: 963817
parent 8d881500
Branches
No related tags found
No related merge requests found
...@@ -622,6 +622,10 @@ public class FMRadioService extends Service ...@@ -622,6 +622,10 @@ public class FMRadioService extends Service
} catch (RemoteException e) { } catch (RemoteException e) {
e.printStackTrace(); e.printStackTrace();
} }
mSpeakerPhoneOn = bA2dpConnected;
Log.d(LOGTAG, "A2DP, mSpeakerPhoneOn: " + bA2dpConnected);
if (!bA2dpConnected) { if (!bA2dpConnected) {
Log.d(LOGTAG, "A2DP device is dis-connected!"); Log.d(LOGTAG, "A2DP device is dis-connected!");
mA2dpDisconnected = true; mA2dpDisconnected = true;
...@@ -797,6 +801,7 @@ public class FMRadioService extends Service ...@@ -797,6 +801,7 @@ public class FMRadioService extends Service
/* Update the UI based on the state change of the headset/antenna*/ /* Update the UI based on the state change of the headset/antenna*/
if(!isAntennaAvailable()) if(!isAntennaAvailable())
{ {
mSpeakerPhoneOn = false;
if (!isFmOn()) if (!isFmOn())
return; return;
/* Disable FM and let the UI know */ /* Disable FM and let the UI know */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment