Merge "Persist TaskRecord before calling performClearTaskLocked."