Heat oil in a large pan over medium-high heat. Add black mustard seeds, turmeric, curry leaves and chile flakes and cook until seeds pop. (Be careful here. Tiny bursting mustard seeds can burn.) This will take 1 to 2 minutes. Add garlic slices, onion and chopped tomatoes. Cook until tomatoes become soft and release their juices. This will take 6 to 8 minutes. Add asafoetida (if using) and salt. Stir rice into the spice/tomato mixture and continue to saute until the flavors permeate the rice.