Calling hidden API in android to turn screen off

后端 未结 3 816
悲哀的现实
悲哀的现实 2020-11-27 17:28

I\'m thinking about using a hidden api to turn the screen off in my app.
setScreenState from https://android.googlesource.com/platform/frameworks/base/+/ecl

3条回答
  •  無奈伤痛
    2020-11-27 17:40

    setScreenState...does what I want, but its a hidden API. Does that mean I shouldn't use it?

    Yes, it means you shouldn't use it. In this case, the whole class would appear to be excluded from the SDK. Please stick to the SDK.

提交回复
热议问题