China has adopted a sweeping ethnic unity law that critics say tightens assimilation and weakens minority rights.