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

Commit b7a81dbb authored by Tyler Saunders's avatar Tyler Saunders
Browse files

Fix RECEIVER_EXPORTED errors.

Test: atest DocumentsUiGoogleTests:CancelFromNotificationUiTest
Test: atest DocumentsUiGoogleTests:FileCopyUiTest
Bug: b/274731331
Change-Id: Ibd6014cd3f43df8ffa4228bb40818fec029dd1a5
parent e6f2b680
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.documentsui;
package com.android.documentsui;


import static android.content.Context.RECEIVER_EXPORTED;

import static com.android.documentsui.StubProvider.EXTRA_SIZE;
import static com.android.documentsui.StubProvider.EXTRA_SIZE;
import static com.android.documentsui.StubProvider.ROOT_0_ID;
import static com.android.documentsui.StubProvider.ROOT_0_ID;
import static com.android.documentsui.StubProvider.ROOT_1_ID;
import static com.android.documentsui.StubProvider.ROOT_1_ID;
@@ -101,7 +103,7 @@ public class CancelFromNotificationUiTest extends ActivityTest<FilesActivity> {


        IntentFilter filter = new IntentFilter();
        IntentFilter filter = new IntentFilter();
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        context.registerReceiver(mReceiver, filter);
        context.registerReceiver(mReceiver, filter, RECEIVER_EXPORTED);
        context.sendBroadcast(new Intent(
        context.sendBroadcast(new Intent(
                TestNotificationService.ACTION_CHANGE_CANCEL_MODE));
                TestNotificationService.ACTION_CHANGE_CANCEL_MODE));


+3 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.documentsui;
package com.android.documentsui;


import static android.content.Context.RECEIVER_EXPORTED;

import static com.android.documentsui.base.Providers.AUTHORITY_STORAGE;
import static com.android.documentsui.base.Providers.AUTHORITY_STORAGE;
import static com.android.documentsui.base.Providers.ROOT_ID_DEVICE;
import static com.android.documentsui.base.Providers.ROOT_ID_DEVICE;


@@ -170,7 +172,7 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {


        IntentFilter filter = new IntentFilter();
        IntentFilter filter = new IntentFilter();
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        context.registerReceiver(mReceiver, filter);
        context.registerReceiver(mReceiver, filter, RECEIVER_EXPORTED);
        context.sendBroadcast(new Intent(
        context.sendBroadcast(new Intent(
                TestNotificationService.ACTION_CHANGE_EXECUTION_MODE));
                TestNotificationService.ACTION_CHANGE_EXECUTION_MODE));
    }
    }
+3 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.documentsui;
package com.android.documentsui;


import static android.content.Context.RECEIVER_EXPORTED;

import static com.android.documentsui.StubProvider.ROOT_0_ID;
import static com.android.documentsui.StubProvider.ROOT_0_ID;


import android.content.BroadcastReceiver;
import android.content.BroadcastReceiver;
@@ -102,7 +104,7 @@ public class FileDeleteUiTest extends ActivityTest<FilesActivity> {


        IntentFilter filter = new IntentFilter();
        IntentFilter filter = new IntentFilter();
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        filter.addAction(TestNotificationService.ACTION_OPERATION_RESULT);
        context.registerReceiver(mReceiver, filter);
        context.registerReceiver(mReceiver, filter, RECEIVER_EXPORTED);
        context.sendBroadcast(new Intent(
        context.sendBroadcast(new Intent(
                TestNotificationService.ACTION_CHANGE_EXECUTION_MODE));
                TestNotificationService.ACTION_CHANGE_EXECUTION_MODE));