Apple Inc. apologized to Chinese consumers on Monday after a two-week protest against its after-sales service which state-run media criticized as “discriminating”.

China Central Television and the ruling Communist Party’s mouthpiece, People’s Daily, accused Apple of discriminating against consumers in China, its second-largest market, with its repair policies, reports Reuters.

Apple denied that China’s current one-year service warranty was far shorter than in other countries. But a statement Apple posted in Chinese on its website said the complaints had prompted “deep reflection” and vowed to overhaul its consumer practices, according to The Associated Press.

“We are aware that owing to insufficient external communication, some consider Apple’s attitude to be arrogant, inattentive or indifferent to consumer feedback,” Apple chief executive Tim Cook said in the statement.

It went on: “We express our sincere apologies for causing consumers any misgivings or misunderstanding.”

Cook said that Apple has “much to learn about operating and communicating in China.”

Apple’s apology underlines the importance of the Chinese market, where the world’s largest technology corporation enjoys strong demand from Chinese consumers.