Invoke the occluding callback only if the activity is occluded

Originally the callback is always called for non-top activities.
That may cause the starting window to be removed at unexpected
timing when calling cancelInitializingActivities.

Fixes: 156712576
Test: atest ActivityStackTests#testCheckBehindFullscreenActivity

Change-Id: I7797c6a295260b52e75d8f47aa8ba26c598697bf
2 files changed