A Sinhalese lady once showed me how to make this curry a couple of years back. Traditionally this mango curry is prepared by cutting unpeeled mangoes right across into two halves (with the pit) and then into four. It was because of the pit that I was not able to figure out what it was the first time I had this. The mango pieces are suppose to be cooked until soft but still holding their shapes and you need firm, green (or slightly ripe but firm) mangoes to make this curry. I usually cut the mango into cubes and I rough peel them as well because I think it tastes better and feels safer.
In Sinhalese cuisine, red chili powder and unroasted curry powder are traditionally used. The rule is that when you use either of these, you should add the chili powder and/or the unroasted curry powder initially (in the oil) and roast it until brown (not burnt) to get the raw flavour out of the powders. Since we always use roasted curry powder to make curries, I always add it later when I remember to. ;) If you use unroasted curry powder, add it initially with the turmeric and the chili powder.
It's also very common to use whole cinnamon quills in many Sinhalese curries, such as this, but I have also seen people skip it since whole cinnamon quills and cardamom pods are rather expensive, that too to be using daily in your curries, which is why I have stated it as an optional ingredient. What it does is to enhance the flavour and the aroma of the curry but it is still a scrumptious curry without it.
Cut the onion finely. Chop and make a smooth paste out of the garlic and ginger. Peel the mangoes and cut them into pieces. Heat some oil in a large pan and fry the chili powder and turmeric until brown but don't let it get burnt. Then add onion, curry leaves, garlic and ginger and saute until until the onion is translucent. Add the mango pieces and mix well until well coated with all the spices. Add the curry powder, water, salt, cinnamon, black pepper and sugar and mix well. Cover and let it cook for about 30-40 minutes at below medium heat till it is as soft as you'd like it to be. The mango pieces are suppose to be cooked until soft but still holding their shapes. Add the coconut milk last and let it cook for about 5 more minutes. Serve hot with rice!