Students and faculty at the University of California (UC) have been warned not to use messaging apps and social media while visiting China, for fear their communications could be used against them by the country's law enforcement agencies.