summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2014-11-19 13:34:55 -0800
committerEd Carrigan <cretin45@gmail.com>2014-11-19 21:45:39 +0000
commit674dc29bc2090df82418490fa9ba8a89a2006a19 (patch)
treeb4465e9b3292301a26c5b9df851e32111c3da0f8
parent013580b3dba8f09fa6ed655223c82f4ef58058d9 (diff)
downloadandroid_packages_apps_Dialer-shipping/cm-11.0.tar.gz
android_packages_apps_Dialer-shipping/cm-11.0.tar.bz2
android_packages_apps_Dialer-shipping/cm-11.0.zip
Dialer: Force media scanner to scan file when recording finishescm-11.0-XNPH05Q-tomato-9828f8e9ccstable/cm-11.0-XNF8Yshipping/cm-11.0
Change-Id: Ibe6e7f8685c9506af032c9f6654130ef6cc55cdd (cherry picked from commit a0a192df70894c6283b14141bdcf5d6a407585bc)
-rw-r--r--src/com/android/services/callrecorder/CallRecorderService.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/services/callrecorder/CallRecorderService.java b/src/com/android/services/callrecorder/CallRecorderService.java
index 4d53ec790..10e7c7f5b 100644
--- a/src/com/android/services/callrecorder/CallRecorderService.java
+++ b/src/com/android/services/callrecorder/CallRecorderService.java
@@ -20,6 +20,7 @@ import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.media.MediaRecorder;
+import android.net.Uri;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemProperties;
@@ -60,6 +61,9 @@ public class CallRecorderService extends Service {
public CallRecording stopRecording() {
if (getState() == RecorderState.RECORDING) {
stopRecordingInternal();
+ Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+ intent.setData(Uri.fromFile(mCurrentRecording.getFile()));
+ sendBroadcast(intent);
return mCurrentRecording;
}
return null;