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

Commit 9994f6dc authored by Timi Rautamäki's avatar Timi Rautamäki
Browse files

Recorder: use the Recordings-directory

Instead of saving recordings to ´Music/Sound records´, save them to
´Recordings´.

Also change the temporary recording location from
/storage/emulated/0/Android/data/org.lineageos.recorder/files/Music/SoundRecords
to
/storage/emulated/0/Android/data/org.lineageos.recorder/files/Recordings

Change-Id: I59d9e9eb3155b5d3a47db51169a36116478c2dfb
parent 3ccf10ff
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 The LineageOS Project
 * Copyright (C) 2021-2022 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -65,7 +65,7 @@ public class SoundRecorderService extends Service {
    public static final String ACTION_RESUME = BuildConfig.APPLICATION_ID + ".service.RESUME";

    public static final String EXTRA_LOCATION = "extra_filename";
    private static final String FILE_NAME_BASE = "SoundRecords/%1$s (%2$s).%3$s";
    private static final String FILE_NAME_BASE = "%1$s (%2$s).%3$s";
    private static final String FILE_NAME_LOCATION_FALLBACK = "Sound record";
    private static final String FILE_NAME_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

@@ -374,7 +374,7 @@ public class SoundRecorderService extends Service {
                locationName == null ? FILE_NAME_LOCATION_FALLBACK : locationName,
                mDateFormat.format(new Date()),
                extension);
        File file = new File(getExternalFilesDir(Environment.DIRECTORY_MUSIC), fileName);
        File file = new File(getExternalFilesDir(Environment.DIRECTORY_RECORDINGS), fileName);
        File recordingDir = file.getParentFile();
        if (recordingDir != null && !recordingDir.exists()) {
            //noinspection ResultOfMethodCallIgnored
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (C) 2021 The LineageOS Project
 * Copyright (C) 2021-2022 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ public final class AddRecordingToContentProviderTask implements Callable<Optiona
    private static final String TAG = "AddRecordingToContentProviderTask";
    private static final String ARTIST = "Recorder";
    private static final String ALBUM = "Sound records";
    private static final String PATH = "Music/" + ALBUM;
    private static final String PATH = "Recordings/" + ALBUM;

    @Nullable
    private final ContentResolver cr;