Fix flakiness of testTaskChangeCallBacks

The test verifies that there is no task removed event before the
test activity is finished. But the task launched by previous test
may be removed when running the current test because the destruction
of activity is not done immediately. That causes the assertion of
task removed event count to fail.

So just only count the event after the current test activity is
started to avoid the noise.

Bug: 130388819
Test: TaskStackChangedListenerTest#testTaskChangeCallBacks
Change-Id: I742cb2f2344a42483af54ecd98fff5a1038900ff
1 file changed