Ensure window has been added in isTopOfTask

Bug 27893230

When isTopOfTask is called prior to the window being added, it
will throw an IllegalArgumentException. This checks that the
window has been added before making the call.

Change-Id: Idd14c0f1051e16d96a0a1fa9f990f380a1f69911
1 file changed