Thats just people in general. I am sure if a girl wanted to talk to you(like a comment on your outfit, or something like that), she may have said something similar. I guess its different actually, because you wouldn't be as nervous in front of a girl i don't think.
But, i think it is just people don't understand intense social shyness. They take it as stand-offish, and conceit. Little do they know its the complete opposite. We care SO MUCH about other peoples opinions that we totally ignore them, lol.
But, a good way to avoid this, rather than staring at your cell phone screen(which im sure you were looking at him out of your peripheral vision, i do the same thing) is this technique; you yawn, stretch, look over your shoulder, or something like that, and as your doing this motion, you take a quick look at the person you think is staring at you. Usually they're not even staring at you, it's just your imagination, but if they are, you have a choice to make. If you are ready for the persons stare, you can smile, or you can just look away real quick, pretending like you were really just stretching, and don't care bout them at all.