Bug 1047143 - close aps entering task-manager, exitToApp to open/restore

remember to fix the unit test