[Android] use explicit not-exported flag for AudioBecomingNoisyReceiver (#3327)
* using explicit not-exported flag for AudioBecomingNoisyReceiver * androidx.core:core version 1.9.0, androix.activity:activity version 1.6.0 --------- Co-authored-by: Andy G <Andy Garron>
This commit is contained in:
parent
ad0422d989
commit
68beb2701a
@ -152,11 +152,10 @@ dependencies {
|
||||
exclude group: 'com.android.support'
|
||||
}
|
||||
|
||||
// All support libs must use the same version
|
||||
implementation "androidx.annotation:annotation:1.1.0"
|
||||
implementation "androidx.core:core:1.1.0"
|
||||
implementation "androidx.media:media:1.1.0"
|
||||
implementation "androidx.activity:activity:1.4.0"
|
||||
implementation "androidx.annotation:annotation:1.7.0"
|
||||
implementation "androidx.core:core:1.9.0"
|
||||
implementation "androidx.media:media:1.6.0"
|
||||
implementation "androidx.activity:activity:1.6.0"
|
||||
|
||||
implementation('com.google.android.exoplayer:extension-okhttp:2.18.1') {
|
||||
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
|
||||
|
@ -2,6 +2,7 @@ package com.brentvatne.receiver;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.media.AudioManager;
|
||||
@ -25,7 +26,7 @@ public class AudioBecomingNoisyReceiver extends BroadcastReceiver {
|
||||
public void setListener(BecomingNoisyListener listener) {
|
||||
this.listener = listener;
|
||||
IntentFilter intentFilter = new IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
|
||||
context.registerReceiver(this, intentFilter);
|
||||
ContextCompat.registerReceiver(context, this, intentFilter, ContextCompat.RECEIVER_NOT_EXPORTED);
|
||||
}
|
||||
|
||||
public void removeListener() {
|
||||
|
Loading…
Reference in New Issue
Block a user