Rising competition from local device makers puts pressure on Silicon Valley group’s business in China