Adding #onRemoveTask and #onCreateTask callbacks.