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

Commit fd95f6d9 authored by Garvit Narang's avatar Garvit Narang Committed by Android (Google) Code Review
Browse files

Revert "Copy Intent while sending the Intent to the listeners asynchronously"

This reverts commit 27390cb5.

Reason for revert: b/418158183

Change-Id: I7b3dd531dfc5b7feef52a9f1340a4db3897dfe75
parent 27390cb5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement
        mHandler.sendMessage(PooledLambda.obtainMessage(
                LaunchObserverRegistryImpl::handleOnIntentStarted,
                this,
                new Intent(intent),
                intent,
                timestampNs));
    }

+1 −6
Original line number Diff line number Diff line
@@ -153,19 +153,14 @@ public class ActivityMetricsLaunchObserverTests extends WindowTestsBase {
    }

    private long onIntentStarted(Intent intent) {
        clearInvocations(mLaunchObserver);
        notifyActivityLaunching(intent);

        long timestamp = -1;
        // If it is launching top activity from trampoline activity, the observer shouldn't receive
        // onActivityLaunched because the activities should belong to the same transition.
        if (!mLaunchTopByTrampoline) {
            final ArgumentCaptor<Intent> intentCaptor = ArgumentCaptor.forClass(Intent.class);
            final ArgumentCaptor<Long> captor = ArgumentCaptor.forClass(Long.class);
            verifyAsync(mLaunchObserver).onIntentStarted(intentCaptor.capture(),
                    captor.capture());
            assertWithMessage("Same intent").that(
                    intent.filterEquals(intentCaptor.getValue())).isTrue();
            verifyAsync(mLaunchObserver).onIntentStarted(eq(intent), captor.capture());
            timestamp = captor.getValue();
        }
        verifyNoMoreInteractions(mLaunchObserver);