title: Calling hidden API in android to turn screen off
body: <p>I'm thinking about using a hidden api to turn the screen off in my app.<br>
  <code>setScreenState</code> from <a href="https://android.googlesource.com/platform/frameworks/base/+/eclair-release/core/java/android/os/Power.java" rel="nofollow noreferrer">https://android.googlesource.com/platform/frameworks/base/+/eclair-release/core/java/android/os/Power.java</a> does what I want, but its a hidden API. Does that mean I shouldn't use it? I would think its a fairly stable API.<br>
  Currently, I'm setting the screen timeout to 1 millisecond, and then resetting the timeout once the screen turns off. However, android ignores the 1 millisecond and instead it takes about 3 seconds to turn off and sometimes it ignores it completely and doesn't turn off.<br>
  Any suggestions?</p>