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

Commit 70ef9675 authored by Jacob Hobbie's avatar Jacob Hobbie
Browse files

Allowing apps under instrumentation who haven't specified a flag to

(temporarily) avoid specifying a receiver exported/not exported flag.

Test: code will be removed
Bug: 161145287
Change-Id: Ie22b31c06554c5961ce2e8acfb71686b9290ad0c
parent 19a969e5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1780,6 +1780,12 @@ class ContextImpl extends Context {
            }
        }
        try {
            ActivityThread thread = ActivityThread.currentActivityThread();
            Instrumentation instrumentation = thread.getInstrumentation();
            if (instrumentation.isInstrumenting()
                    && ((flags & Context.RECEIVER_NOT_EXPORTED) == 0)) {
                flags = flags | Context.RECEIVER_EXPORTED;
            }
            final Intent intent = ActivityManager.getService().registerReceiverWithFeature(
                    mMainThread.getApplicationThread(), mBasePackageName, getAttributionTag(),
                    AppOpsManager.toReceiverId(receiver), rd, filter, broadcastPermission, userId,