在openmoko (稳定混合版本,SHR)中,如何在应用程序运行时程序化地关闭屏幕保护程序(几秒钟不活动后的暗显/空白屏幕)?
发布于 2008-12-29 19:01:04
在X中,您可以运行
xset s off关闭屏幕保护程序。类似地,gnome/freedesktop公开了一个DBUS API来控制和禁止屏幕保护模式。我不知道OpenMoko是否支持freedesktop规范,但如果支持,您应该能够直接使用DBUS。你可以看到Totem是如何通过here来实现的。
发布于 2009-11-10 23:42:02
FSORaw是一个包装器,您可以在外部使用它来声明像显示器这样的资源。这将防止屏幕消隐。但如果它是您自己的应用程序,我建议您在您的软件中声明相同的显示资源。
more about fsoraw and resources
发布于 2009-04-19 12:36:06
通过freesmartphone的D-BUS API可以做到这一点,也可以防止挂起。
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy CPU auto
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display auto将auto替换为enabled或disabled。
您可以在http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Usage.html;hb=HEAD#GetResourcePolicy上找到此D-BUS方法的文档
https://stackoverflow.com/questions/397927
复制相似问题