sucks what happened to your friend man.
i have only been caught doing drugs in public by the police once, and surprisingly nothing happened.
there was a group of 8 of us standing around our parked cars by the river, with two bongs and a bowl containing the remains of a session sitting in the tray of a ute.
a car entered the car park and hit us with their high beams. by this point we knew it was the police.
one officer got out and spoke with us, asked us how much we smoked then took the hoses out of the bongs and put them in a nearby bin.
he actually told us that the police don't care if they bust kids smoking weed, unless it is an alarmingly large amount or if you get caught doing it in an area where there are other citizens close by.
i still advise to stay clear of doing this stuff in public. it probably isn't the best option.
also, don't read what i just wrote then go out and get lit in a carpark with a bunch of mates thinking nothing of it. we probably just got off really lucky.