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

Commit c2d9c8e2 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix issue #3385054: HRI24 never enters suspend (LP0) - IKXEVEREST-3439

Um.  My fix for calling onReceive() even after a receiver is
unregistered actually made it so onReceive() is never called for
the result receiver of a broadcast.

Change-Id: I30efe05d8fdec6fee4222b7d797f2b303073dbcc
parent 5d9d03a0
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -567,6 +567,7 @@ final class LoadedApk {
            } else {
                rd.validate(context, handler);
            }
            rd.mForgotten = false;
            return rd.getIIntentReceiver();
        }
    }
@@ -596,6 +597,7 @@ final class LoadedApk {
                        rd.setUnregisterLocation(ex);
                        holder.put(r, rd);
                    }
                    rd.mForgotten = true;
                    return rd.getIIntentReceiver();
                }
            }
@@ -666,6 +668,7 @@ final class LoadedApk {
        final boolean mRegistered;
        final IntentReceiverLeaked mLocation;
        RuntimeException mUnregisterLocation;
        boolean mForgotten;

        final class Args extends BroadcastReceiver.PendingResult implements Runnable {
            private Intent mCurIntent;
@@ -696,7 +699,7 @@ final class LoadedApk {
                final Intent intent = mCurIntent;
                mCurIntent = null;
                
                if (receiver == null || !mRegistered) {
                if (receiver == null || mForgotten) {
                    if (mRegistered && ordered) {
                        if (ActivityThread.DEBUG_BROADCAST) Slog.i(ActivityThread.TAG,
                                "Finishing null broadcast to " + mReceiver);