Not surprising. China's foreign policy has basically bren:
No intervention in other country's affairs from China.
No intervention in China's affairs from other countries.
Agree with whatever the UN ruled on. (They have veto power so they are never at risk, also see point 2.) Since the two state thing is an UN resolution. China supports it.