I have a tablet (Samsung Galaxy Note 10.1) and a phone (Google Nexus 5X) both with CyanogenMod as ROM. When I close the lid of the case on the tablet, it automatically turns off the screen (and locks after some time). However, the phone stays active until the display timeout.
Is there a special setting or some hardware sensor which is not present in the phone or maybe difference in Android versions for phones and tablets?
I searched a bit and found app recommendations with the warning, that they will drain the battery. But when it's enabled in CyanogenMod, it should work on both devices without any apps, shouldn't it?
So is there some setting, does it depend on sensors, maybe the case (the tablet one closes with a small magnet, but I guess the proximity or brightness sensor should toggle the screen) or what else can be the cause for different behaviour?