An officer won't be reading your notes or looking at your phone if has ethics unless they are the subject of the investigation. If he looks at them without cause and finds anything it is not admissible anyway. If he's looking through a bag for weapons he would have to explain why he was in a notebook or a phone. This doesn't mean someone wouldn't but they shouldn't.
If he was checking you for weapons he will check all of you for weapons (not just a firearm) including pockets. Perfectly legal.