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

Commit 4e39191d authored by Mark Harman's avatar Mark Harman
Browse files

Fix Android warnings, need to declare caller requires permission.

parent 4b917b2f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.util.Log;

import androidx.annotation.RequiresPermission;

/** Sets up a listener to listen for noise level.
 */
class AudioListener {
@@ -20,6 +22,7 @@ class AudioListener {

    /** Create a new AudioListener. The caller should call the start() method to start listening.
     */
    @RequiresPermission(android.Manifest.permission.RECORD_AUDIO)
    AudioListener(final AudioListenerCallback cb) {
        if( MyDebug.LOG )
            Log.d(TAG, "new AudioListener");