Shanghai has a new way to deal with absent-minded Chinese pedestrians glued to their smartphones.