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

Promotion of fm.lnx.2.1-00029.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
2007816   Ic6811652a2356a80d3ba3517bf7ea11f73328ed3   FM Radio: Don't register AUDIO_BECOMING_NOISY intent
2009578   I23f271d6c1f32416aa10a9113273dde477b8a0d8   FM: Fix null pointer exception
2007818   Iba88994819fdf1b1489a654777111d7a0b769c7c   FM Radio: Don't register A2DP service listener

Change-Id: Ib30a8c899097152cc539f9d95e57509b8525e82e
CRs-Fixed: 2007816, 2009578, 2007818
parents ca8ac1d6 2cfb9a95
No related branches found
No related tags found
No related merge requests found
......@@ -223,6 +223,8 @@ public class FMRadioService extends Service
private static Object mNotchFilterLock = new Object();
private boolean mFmA2dpDisabled;
public FMRadioService() {
}
......@@ -230,6 +232,7 @@ public class FMRadioService extends Service
public void onCreate() {
super.onCreate();
mFmA2dpDisabled = SystemProperties.getBoolean("fm.a2dp.conc.disabled",false);
mPrefs = new FmSharedPreferences(this);
mCallbacks = null;
TelephonyManager tmgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
......@@ -254,7 +257,6 @@ public class FMRadioService extends Service
mSession.setFlags(MediaSession.FLAG_EXCLUSIVE_GLOBAL_PRIORITY |
MediaSession.FLAG_HANDLES_MEDIA_BUTTONS);
mSession.setActive(true);
registerAudioBecomeNoisy();
if ( false == SystemProperties.getBoolean("ro.fm.mulinst.recording.support",true)) {
mSingleRecordingInstanceSupported = true;
}
......@@ -271,6 +273,7 @@ public class FMRadioService extends Service
mA2dpDeviceSupportInHal = valueStr.contains("=true");
Log.d(LOGTAG, " is A2DP device Supported In HAL"+mA2dpDeviceSupportInHal);
if (!mFmA2dpDisabled)
getA2dpStatusAtStart();
}
......@@ -609,7 +612,6 @@ public class FMRadioService extends Service
*/
public void registerHeadsetListener() {
if (mHeadsetReceiver == null) {
boolean fm_a2dp_disabled = SystemProperties.getBoolean("fm.a2dp.conc.disabled",true);
mHeadsetReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
......@@ -684,7 +686,7 @@ public class FMRadioService extends Service
AudioManager am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
IntentFilter iFilter = new IntentFilter();
iFilter.addAction(Intent.ACTION_HEADSET_PLUG);
if (!fm_a2dp_disabled) {
if (!mFmA2dpDisabled) {
iFilter.addAction(mA2dpDeviceState.getActionSinkStateChangedString());
}
iFilter.addAction("HDMI_CONNECTED");
......@@ -1584,6 +1586,7 @@ public class FMRadioService extends Service
switch (msg.arg1) {
case AudioManager.AUDIOFOCUS_LOSS_TRANSIENT:
Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS_TRANSIENT");
if (mReceiver != null)
mReceiver.EnableSlimbus(RESET_SLIMBUS_DATA_PORT);
if (true == isFmRecordingOn())
stopRecording();
......@@ -1597,6 +1600,7 @@ public class FMRadioService extends Service
case AudioManager.AUDIOFOCUS_LOSS:
Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS");
//intentional fall through.
if (mReceiver != null)
mReceiver.EnableSlimbus(RESET_SLIMBUS_DATA_PORT);
if (mSpeakerPhoneOn) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment