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

Commit d6724757 authored by Jonas Schwertfeger's avatar Jonas Schwertfeger
Browse files

Added noop unregisterReceiver to complement existing noop registerReceiver.

Without this addition, code that is being tested using an isolated context
can cause an exception if it unregisters a previously registered broadcast
receiver.  This is because the isolated context never actually registered
the receiver in the first place.  The fix is to make sure the isolated
context is consistent in ignoring both recevier registration and
unregistration calls.

Change-Id: Ie0ba6f4bb10f5248704327a0ffc8e37ee8b71ae2
parent 7d9c73fb
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -86,6 +86,11 @@ public class IsolatedContext extends ContextWrapper {
        return null;
    }

    @Override
    public void unregisterReceiver(BroadcastReceiver receiver) {
        // Ignore
    }

    @Override
    public void sendBroadcast(Intent intent) {
        mBroadcastIntents.add(intent);