Loading services/core/java/com/android/server/wm/LaunchObserverRegistryImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement mHandler.sendMessage(PooledLambda.obtainMessage( LaunchObserverRegistryImpl::handleOnIntentStarted, this, intent, new Intent(intent), timestampNs)); } Loading services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +6 −1 Original line number Diff line number Diff line Loading @@ -153,14 +153,19 @@ 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(eq(intent), captor.capture()); verifyAsync(mLaunchObserver).onIntentStarted(intentCaptor.capture(), captor.capture()); assertWithMessage("Same intent").that( intent.filterEquals(intentCaptor.getValue())).isTrue(); timestamp = captor.getValue(); } verifyNoMoreInteractions(mLaunchObserver); Loading Loading
services/core/java/com/android/server/wm/LaunchObserverRegistryImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ class LaunchObserverRegistryImpl extends ActivityMetricsLaunchObserver implement mHandler.sendMessage(PooledLambda.obtainMessage( LaunchObserverRegistryImpl::handleOnIntentStarted, this, intent, new Intent(intent), timestampNs)); } Loading
services/tests/wmtests/src/com/android/server/wm/ActivityMetricsLaunchObserverTests.java +6 −1 Original line number Diff line number Diff line Loading @@ -153,14 +153,19 @@ 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(eq(intent), captor.capture()); verifyAsync(mLaunchObserver).onIntentStarted(intentCaptor.capture(), captor.capture()); assertWithMessage("Same intent").that( intent.filterEquals(intentCaptor.getValue())).isTrue(); timestamp = captor.getValue(); } verifyNoMoreInteractions(mLaunchObserver); Loading