From 674dc29bc2090df82418490fa9ba8a89a2006a19 Mon Sep 17 00:00:00 2001 From: cretin45 Date: Wed, 19 Nov 2014 13:34:55 -0800 Subject: Dialer: Force media scanner to scan file when recording finishes Change-Id: Ibe6e7f8685c9506af032c9f6654130ef6cc55cdd (cherry picked from commit a0a192df70894c6283b14141bdcf5d6a407585bc) --- src/com/android/services/callrecorder/CallRecorderService.java | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3