-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[已解决]代码里关闭屏幕、打开屏幕 #529
Comments
这东西还和系统设置有关吧,我记得系统->设置那里可以设定:通知来了唤醒屏幕 |
Hello EveryBody, Today is 秋分, Happy still. 😆 👍 又了解了下,姿势是这样的:
这两个相当于按下电源键操作, 需要系统权限哦
|
为什么 我找不到 goToSleep 和 wakeUp 这两个方法 |
http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/os/PowerManager.java#897 |
这个是假待机吧,我关了之后应该可以在后台现在再打开吧。或者对于假待机有什么建议吗
| |
15088134193
|
|
邮箱:15088134193@163.com
|
Signature is customized by Netease Mail Master
在2019年01月25日 23:15,等车的猪 写道:
Hello EveryBody, Today is 秋分, Happy still.
又了解了下,姿势是这样的:
mWakeLock.acquire(); 和 mWakeLock.release(); 是在锁屏时使用的。
锁屏下,获取锁后可以运行,运行结束,release即可,成对使用。
设备管理器就是这样子了,姿势就这么点。
现在用的姿势是这个:(一开始就用的这个,但是当时硬件有些问题,以为不可取,所以来这里提问,现在完美了 smile )
关屏:
mPowerManager.goToSleep(SystemClock.uptimeMillis());
开屏:
mPowerManager.wakeUp(SystemClock.uptimeMillis());
这两个相当于按下电源键操作, 需要系统权限哦
This is what happens when the power key is pressed to turn off the screen.
为什么 我找不到 goToSleep 和 wakeUp 这两个方法
http://androidxref.com/9.0.0_r3/xref/frameworks/base/core/java/android/os/PowerManager.java#897
是hidden方法
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
所以 |
我先说说我的姿势:
公司自己编译的4.4.2系统
The text was updated successfully, but these errors were encountered: