Pass exact close method to onClose as new parameter.

Change-Id: I350b64c026da9324ed830404bbe81ffc57e0a5b6