Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 674dc29b authored by cretin45's avatar cretin45 Committed by Ed Carrigan
Browse files

Dialer: Force media scanner to scan file when recording finishes

Change-Id: Ibe6e7f8685c9506af032c9f6654130ef6cc55cdd
(cherry picked from commit a0a192df)
parent 013580b3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;