The detention system will come to an end on 29 December. Those still in custody will be released, according to Xinhua, China's state media.