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

Commit d3086e08 authored by Ronish Kalia's avatar Ronish Kalia
Browse files

Use RECEIVER_EXPORTED in BugreportManagerTest

Bug: 331378752
Change-Id: I8a6eee9cd982f596e8c0e13fda1928b6f2c72c82
parent 869e636a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.os.bugreports.tests;

import static android.content.Context.RECEIVER_EXPORTED;

import static com.google.common.truth.Truth.assertThat;

import static org.junit.Assert.assertNotNull;
@@ -358,7 +360,10 @@ public class BugreportManagerTest {
        // shell UID rather than our own.
        BugreportBroadcastReceiver br = new BugreportBroadcastReceiver();
        InstrumentationRegistry.getContext()
                .registerReceiver(br, new IntentFilter(INTENT_BUGREPORT_FINISHED));
                .registerReceiver(
                        br,
                        new IntentFilter(INTENT_BUGREPORT_FINISHED),
                        RECEIVER_EXPORTED);
        UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
                .executeShellCommand("am bug-report");