summaryrefslogtreecommitdiffstats
path: root/FMRecord
diff options
context:
space:
mode:
authorVenkateshwarlu Domakonda <vdomak@codeaurora.org>2014-05-30 17:15:21 +0530
committerVenkateshwarlu Domakonda <vdomak@codeaurora.org>2014-05-30 17:15:21 +0530
commitee19114c8f270006013f4c358d5f3a8f6178f6d5 (patch)
treee7b63133c7fb3ae041a33cee74ea292f6d9dc43c /FMRecord
parent360a450969d45c3633d0d319945fd70d8985da10 (diff)
downloadandroid_hardware_qcom_fm-ee19114c8f270006013f4c358d5f3a8f6178f6d5.tar.gz
android_hardware_qcom_fm-ee19114c8f270006013f4c358d5f3a8f6178f6d5.tar.bz2
android_hardware_qcom_fm-ee19114c8f270006013f4c358d5f3a8f6178f6d5.zip
FMRecord: Fix the issue with SDCard mount/unmounts
Remove the SDCard mount/un-mount listener as the FM recording is not doing in SDCard. Change-Id: Ib11fee493d9e4460d2eb64fc108aec3cb460acd7 CRs-Fixed: 672483
Diffstat (limited to 'FMRecord')
-rw-r--r--FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
index 62f4a94..d1c6154 100644
--- a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
+++ b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
@@ -92,7 +92,6 @@ public class FMRecordingService extends Service {
private Thread mStatusCheckThread = null;
private int clientPid = -1;
private String clientProcessName = "";
- private BroadcastReceiver mSdcardUnmountReceiver = null;
private String mAudioType = "audio/*";
public void onCreate() {
@@ -101,7 +100,6 @@ public class FMRecordingService extends Service {
Log.d(TAG, "FMRecording Service onCreate");
registerRecordingListner();
registerShutdownListner();
- registerStorageMediaListener();
}
public int onStartCommand(Intent intent, int flags, int startId) {
@@ -118,7 +116,6 @@ public class FMRecordingService extends Service {
}
unregisterBroadCastReceiver(mFmRecordingReceiver);
unregisterBroadCastReceiver(mFmShutdownReceiver);
- unregisterBroadCastReceiver(mSdcardUnmountReceiver);
super.onDestroy();
}
@@ -200,33 +197,6 @@ public class FMRecordingService extends Service {
return true;
}
- private void registerStorageMediaListener() {
- if (mSdcardUnmountReceiver == null) {
- mSdcardUnmountReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- String action = intent.getAction();
- if ((action.equals(Intent.ACTION_MEDIA_UNMOUNTED))
- || action.equals(Intent.ACTION_MEDIA_EJECT)) {
- Log.d(TAG, "ACTION_MEDIA_UNMOUNTED Intent received");
- if (mFmRecordingOn == true) {
- try {
- stopRecord();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
- };
- IntentFilter iFilter = new IntentFilter();
- iFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
- iFilter.addAction(Intent.ACTION_MEDIA_EJECT);
- iFilter.addDataScheme("file");
- registerReceiver(mSdcardUnmountReceiver, iFilter);
- }
- }
-
private void sendRecordingStatusIntent(int status) {
Intent intent = new Intent(ACTION_FM_RECORDING_STATUS);
intent.putExtra("state", status);