Make sure endClosing doesn't get called too early

Bug: 22196478
Bug: 22184101
Change-Id: I3488c40b74a080efbba9b1544f9709f7e509988b
1 file changed