The Shanghai-listed company says it will sell its consumer-electronics contract manufacturing business to focus on semiconductors.