One has heard of countries where you should remove the PIN code of your phone when passing through airport security. Does this also apply to Sweden?
It's not necessarily that your phone will be checked therefore your pin code should not need to be removed. If so there is nothing suspicious about you removing your pin code there as you don't know if your phone will be checked.
On the Stockholm Arlanda Airport Security Website:
Place your plastic bag with liquids in the tray so it is can be seen. Empty your pockets of mobile phones, keys and coins.
That is the only mention of phones and it doesn't say to get them ready for inspection or that they will be inspected.
I have been an exchange student in Stockholm for one year (in 2017-2018), it never happened to me and I have never seen / heard of it happening to anyone.
Note that I was travelling exclusively from and to Arlanda Airport and mostly from and to Geneva (Switzerland, in Europe but not EU), I passed the security checks about 10 times in total.
It can happen, but it's not a very thorough search at all.
It happened to me a few months ago after failing the x-ray. I had booze from an earlier trip still in the sealed bag which of course is very odd.
The officer asked for my boarding pass which I of course had in my phone. If I'd have had a physical one then my phone wouldn't have been checked.
I opened the airline app and showed the boarding pass. The officer then looked through my notifications and some of my text messages and noted that I had flown to XXX destination a few weeks back and then he handed me my phone back.
To prevent this one could either have a paper boarding pass or use the "lock app" feature in Android which will prevent anyone from switching apps.
The switching of apps could've been accidental.
1You don't have to hand over your phone when showing the boarding pass.– JonathanReez ♦Aug 17, 2019 at 23:46
@JonathanReez added that. One does if you have it in your phone. Aug 17, 2019 at 23:47
2@MikaelDúiBolinder I have never handed over my phone to show my boarding pass - I show it and pass it over the scanner myself if required– MidavaloAug 17, 2019 at 23:51
@Midavalo it was after failing the x-ray, the officer who went through my bag wanted to have a look at it. I don't remember them having any scanner there. Aug 17, 2019 at 23:54
8This does not look like "checking your phone" to me but verifying your boarding pass and seeing some other derails on your phone. I doubt this officer would have asked for your phone.– Willeke ♦Aug 18, 2019 at 0:42