I might be wrong but I think the internal compass in smartphones is usually not of the magnetic type, it is rather an inertial compass device. Inertial compass is not sensitive to metallic or magnetic objects nearby. Why I suspect that; I have tried moving powerful magnets around Jolla and that did not affect the compass reading.