The president, like all travelers to China, was told not to use personal devices in order to protect his data from hackers.