Turning screen on and off programmatically not working on some devices
问题 I use the code below to turn the screen on and off. Both pieces of code work on most devices (tested on Galaxy Note, Galaxy S2, etc. etc.) but don't work on a few (mostly tablets but some phones as well). On some devices screen on works but screen off doesn't, and the opposite holds for some other devices. I'm not sure what the cause is since it's pretty standard code (and since it works on some devices that means triggering these functions i.e. the function call, is not a problem). Are there