Compass needle deflected when near off smartphone

It puzzles me that a compass needle is deflected when I bring it near (~ 2 cm above the screen) my turned off Android smartphone, which can only mean there is still a electric current inside it. Surprisingly, the deflection is the same with the phone turned on. What may be the reason behind it?

I could yet not verify whether the same happens with other mobile phones.