Skip to content

Commit

Permalink
chore: Suppress lint check for missing permission (#3577)
Browse files Browse the repository at this point in the history
* Suppress lint check for missing permission

* SuppressLint on testUtils
  • Loading branch information
mattcreaser authored May 16, 2024
1 parent adec7ed commit 62a5fb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package com.amazonaws.mobileconnectors.lex.interactionkit.internal.audio;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.media.AudioFormat;
Expand Down Expand Up @@ -115,6 +116,7 @@ public class AudioRecorder implements AudioSource {
* @param format the audio format the audio recorder will use.
* @throws Exception if failed to create audio recorder instance.
*/
@SuppressLint("MissingPermission") // App Developer should check for Manifest.permission.RECORD_AUDIO permission
public AudioRecorder(final Context context, final MediaType mediaType,
final int recorderPositionNotificationPeriod,
final int sampleRate, final int channels, final int format) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

package com.amazonaws.testutils.util;

import android.annotation.SuppressLint;
import android.content.ContentResolver;
import android.content.Intent;
import android.provider.Settings;
Expand Down Expand Up @@ -44,6 +45,7 @@ public static boolean isEnabled() {
return status == 1;
}

@SuppressLint("MissingPermission")
private static void setAirplaneMode(boolean shouldEnable) {
if (shouldEnable == isEnabled()) return;

Expand Down

0 comments on commit 62a5fb4

Please sign in to comment.