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

We had better to early return here.
if (window.taskManager && window.taskManager.isShown()) {
  return;
}