Fix DreamService not finishing correctly

CL assigns null to DreamService.mActivity when the DecorView of the
main window is detached (in onViewDetachedFromWindow()). This is also
when the Window is detached, so at that point the DreamService doesn't
care about the DreamActivity.

Fix: 152994058

Test: atest DreamManagerServiceTests

Change-Id: I716f443b2876a2db57df999a551eee31e98ab4f1
1 file changed