Refactor sync locking and clearing in parent activity