Is diet flexibility an adaptive life trait for relictual and peri-urban populations of the endangered primate Macaca sylvanus?

Is diet flexibility an adaptive life trait for relictual and peri-urban populations of the endangered primate Macaca sylvanus?