summaryrefslogtreecommitdiffstats
path: root/FMRecord
diff options
context:
space:
mode:
authorVenkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>2013-08-12 18:06:54 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2013-08-12 05:45:09 -0700
commit3f69be1c8bd2b5e98b080ee82f4b8ea8ab609e20 (patch)
tree62343becd40fae09d726ec83ae24348db66b7b5e /FMRecord
parent1fd129339d052426c1459e36e5384422af63851c (diff)
downloadandroid_hardware_qcom_fm-3f69be1c8bd2b5e98b080ee82f4b8ea8ab609e20.tar.gz
android_hardware_qcom_fm-3f69be1c8bd2b5e98b080ee82f4b8ea8ab609e20.tar.bz2
android_hardware_qcom_fm-3f69be1c8bd2b5e98b080ee82f4b8ea8ab609e20.zip
FMRecord: Remove SDcard status change handler
- As the recording always do in internal memory, no need to handle SDCard status change. - Remove the SDCard status change handler. Change-Id: Iee062cbafb9b380ec6455d4438229cb940d686b0 CRs-Fixed: 525031
Diffstat (limited to 'FMRecord')
-rw-r--r--FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java35
1 files changed, 0 insertions, 35 deletions
diff --git a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
index 4657e36..3fb6446 100644
--- a/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
+++ b/FMRecord/src/com/codeaurora/fmrecording/FMRecordingService.java
@@ -61,7 +61,6 @@ import android.os.StatFs;
public class FMRecordingService extends Service {
private static final String TAG = "FMRecordingService";
private BroadcastReceiver mFmRecordingReceiver = null;
- private BroadcastReceiver mSdcardUnmountReceiver = null;
public static final long UNAVAILABLE = -1L;
public static final long PREPARING = -2L;
public static final long UNKNOWN_SIZE = -3L;
@@ -84,7 +83,6 @@ public class FMRecordingService extends Service {
super.onCreate();
Log.d(TAG, "FMRecording Service onCreate");
registerRecordingListner();
- registerExternalStorageListener();
}
public int onStartCommand(Intent intent, int flags, int startId) {
@@ -100,7 +98,6 @@ public class FMRecordingService extends Service {
stopRecord();
}
unregisterBroadCastReceiver(mFmRecordingReceiver);
- unregisterBroadCastReceiver(mSdcardUnmountReceiver);
super.onDestroy();
}
@@ -116,38 +113,6 @@ public class FMRecordingService extends Service {
myreceiver = null;
}
}
- /**
- * Registers an intent to listen for ACTION_MEDIA_UNMOUNTED notifications.
- * The intent will call closeExternalStorageFiles() if the external media
- * is going to be ejected, so applications can clean up.
- */
- private void registerExternalStorageListener() {
- 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 static long getAvailableSpace() {
String state = Environment.getExternalStorageState();