Merge "Add unaudited exported flag to exposed runtime receivers"

This commit is contained in:
Michael Groover
2022-01-03 17:35:02 +00:00
committed by Android (Google) Code Review
25 changed files with 52 additions and 26 deletions

View File

@@ -52,7 +52,8 @@ public class AlwaysDiscoverable extends BroadcastReceiver {
if (mStarted) {
return;
}
mContext.registerReceiver(this, mIntentFilter);
mContext.registerReceiver(this, mIntentFilter,
Context.RECEIVER_EXPORTED_UNAUDITED);
mStarted = true;
if (mBluetoothAdapter.getScanMode()
!= BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {

View File

@@ -115,7 +115,8 @@ public final class BluetoothEnabler implements SwitchWidgetController.OnSwitchCh
}
mSwitchController.startListening();
mContext.registerReceiver(mReceiver, mIntentFilter);
mContext.registerReceiver(mReceiver, mIntentFilter,
Context.RECEIVER_EXPORTED_UNAUDITED);
mValidListener = true;
}