The tech giant has pledged to stop the controversial practice of using NDAs with local governments.