代码之家  ›  专栏  ›  技术社区  ›  OJW

在OpenMoko应用程序运行时关闭屏幕保护程序

  •  0
  • OJW  · 技术社区  · 16 年前

    在openmoko(stable hybrid release,shr)中,如何在应用程序运行时以编程方式关闭屏幕保护程序(几秒钟不活动后的暗屏/空白屏幕)?

    3 回复  |  直到 15 年前
        1
  •  1
  •   codelogic    16 年前

    在X里,你可以跑

    xset s off
    

    关闭屏幕保护程序。类似地,gnome/freedesktop公开了一个dbus api来控制和禁止屏保模式。我不知道openmoko是否支持freedesktop规范,但如果支持,您应该可以直接使用dbus。你可以看到图腾是怎么做到的 here .

        2
  •  1
  •   daramarak    15 年前

    fsoraw是一个包装器,您可以在外部使用它来声明资源,比如显示。这将防止屏幕空白。但如果是您自己的应用程序,我建议您在软件中声明相同的显示资源。

    more about fsoraw and resources

        3
  •  0
  •   Baruch Even    15 年前

    可以通过 freesmartphone ,也可以防止暂停。

    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
    

    将“自动”替换为“启用”或“禁用”。

    您可以在 http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/org.freesmartphone.Usage.html;hb=HEAD#GetResourcePolicy

    推荐文章