diff options
author | cretin45 <cretin45@gmail.com> | 2014-11-19 13:34:55 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2014-11-19 13:34:55 -0800 |
commit | a0a192df70894c6283b14141bdcf5d6a407585bc (patch) | |
tree | b4465e9b3292301a26c5b9df851e32111c3da0f8 | |
parent | ff8ad3a3d0ba5f49eea78564be1a50aabc689d66 (diff) | |
download | android_packages_apps_Dialer-a0a192df70894c6283b14141bdcf5d6a407585bc.tar.gz android_packages_apps_Dialer-a0a192df70894c6283b14141bdcf5d6a407585bc.tar.bz2 android_packages_apps_Dialer-a0a192df70894c6283b14141bdcf5d6a407585bc.zip |
Dialer: Force media scanner to scan file when recording finishes
Change-Id: Ibe6e7f8685c9506af032c9f6654130ef6cc55cdd
-rw-r--r-- | src/com/android/services/callrecorder/CallRecorderService.java | 4 |
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; |