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

Unverified Commit 1346277a authored by Luca Stefani's avatar Luca Stefani
Browse files

Recorder: Update Gradle wrapper to 8.10

Since BuildConfig is deprecated we now get the package
name from the application context
We remove the app name from the service actions, as those
actions are to be handled only internally in the service,
they don't need to be specific.

Change-Id: I4205f7af457955b59790201a97ea60b8bec4d0aa
parent 7fdcf5e9
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ android_app {

    srcs: [
        "src/main/java/**/*.kt",
        "src_aosp/main/java/**/*.kt",
    ],

    product_specific: true,
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ class ListActivity : AppCompatActivity(), RecordingListCallbacks {
    private fun loadRecordings() {
        taskExecutor.runTask(
            GetRecordingsTask(
                applicationContext.packageName,
                contentResolver
            )
        ) { list: List<RecordingData> ->
+4 −5
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.util.Log
import androidx.annotation.GuardedBy
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import org.lineageos.recorder.BuildConfig
import org.lineageos.recorder.ListActivity
import org.lineageos.recorder.R
import org.lineageos.recorder.RecorderActivity
@@ -568,10 +567,10 @@ class SoundRecorderService : Service() {
    companion object {
        private const val TAG = "SoundRecorderService"

        const val ACTION_START = "${BuildConfig.APPLICATION_ID}.service.START"
        const val ACTION_STOP = "${BuildConfig.APPLICATION_ID}.service.STOP"
        const val ACTION_PAUSE = "${BuildConfig.APPLICATION_ID}.service.PAUSE"
        const val ACTION_RESUME = "${BuildConfig.APPLICATION_ID}.service.RESUME"
        const val ACTION_START = "START"
        const val ACTION_STOP = "STOP"
        const val ACTION_PAUSE = "PAUSE"
        const val ACTION_RESUME = "RESUME"

        const val MSG_REGISTER_CLIENT = 0
        const val MSG_UNREGISTER_CLIENT = 1
+2 −2
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ package org.lineageos.recorder.task
import android.content.ContentResolver
import android.content.ContentUris
import android.provider.MediaStore
import org.lineageos.recorder.BuildConfig
import org.lineageos.recorder.list.RecordingData
import java.time.Instant
import java.time.LocalDateTime
@@ -16,6 +15,7 @@ import java.time.ZoneId
import java.util.concurrent.Callable

class GetRecordingsTask(
    private val packageName: String,
    private val contentResolver: ContentResolver,
) : Callable<List<RecordingData>> {
    override fun call(): List<RecordingData> {
@@ -26,7 +26,7 @@ class GetRecordingsTask(
            PROJECTION,
            "${MediaStore.Audio.Media.OWNER_PACKAGE_NAME}=?",
            arrayOf(
                BuildConfig.APPLICATION_ID,
                packageName,
            ),
            MY_RECORDS_SORT
        )?.use { cursor ->
+0 −10
Original line number Diff line number Diff line
/*
 * SPDX-FileCopyrightText: 2024 The LineageOS Project
 * SPDX-License-Identifier: Apache-2.0
 */

package org.lineageos.recorder

object BuildConfig {
    const val APPLICATION_ID = "org.lineageos.recorder"
}
Loading