diff options
author | cretin45 <cretin45@gmail.com> | 2014-11-19 13:34:55 -0800 |
---|---|---|
committer | Ed Carrigan <cretin45@gmail.com> | 2014-11-19 21:45:39 +0000 |
commit | 674dc29bc2090df82418490fa9ba8a89a2006a19 (patch) | |
tree | b4465e9b3292301a26c5b9df851e32111c3da0f8 | |
parent | 013580b3dba8f09fa6ed655223c82f4ef58058d9 (diff) | |
download | android_packages_apps_Dialer-cm-11.0-XNPH05Q-tomato-9828f8e9cc.tar.gz android_packages_apps_Dialer-cm-11.0-XNPH05Q-tomato-9828f8e9cc.tar.bz2 android_packages_apps_Dialer-cm-11.0-XNPH05Q-tomato-9828f8e9cc.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.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; |