JavaFXPorts - 电池消耗 - 屏幕始终打开 [英] JavaFXPorts - Battery consumtion - Screen always on

查看:228
本文介绍了JavaFXPorts - 电池消耗 - 屏幕始终打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个关于 JavaFXPorts '电池消耗的问题。在 Android IOS 上,屏幕始终开启。手机变得非常热......

I've a question about JavaFXPorts' battery consumption. On both Android and IOS, the screen is always on. And the phones get quite hot...

在Android上创建跟踪转储或查看IOS上的大量日志时,您可以看到 QuantumRenderer 一直处于活动状态(在 IOS 上你可以看到消息 setSwapInterval([0 | 1]) (OpenGL?)经常 - 这可能是一个领先。

When creating a trace dump on Android or looking at the extensive log on IOS, you can see the QuantumRenderer to be active the whole time (on IOS you can see the message setSwapInterval([0|1]) (OpenGL?) constantly - this could be a lead.

否则:是否有可能,设置永远在线标志?如果是这样:如何关闭???

Otherwise: Is it possible, that there's a "always on" flag set? If so: How to turn it off???

问候,
Daniel

Regards, Daniel

编辑如下图所示,我对应用程序的运行进行了跟踪(事实上,我做了几次)。

As the image below shows, I did a trace (in fact, I did several) of the app running.

正如您所看到的,这个不祥的计时器处于活动状态。在应用程序中实际存在是一个Timer,我已经完全停用了它的用法,但是这个Timer-0线程仍处于活动状态...除了Charm-Down BLE之外,我怀疑的线程并不多。而计时器表示,某些东西是重复激活的。这可能是正常的Android行为吗?

As you can see, there is this ominous Timer active. While in the App there actually is a Timer, I've completely deactivated it's usage, but this "Timer-0" thread is still active... Beside the Charm-Down BLE, there are not many threads I'd suspect. And Timer indicates, that something is active repeatedly. Is this a normal Android behaviour, maybe?

此外我想再次声明:我在应用程序中有一些JavaFX服务,但由于只有这一个Thread-1952,我认为这不是原因...

Additionally I'd like to state again: I have some JavaFX-Services in the app, but since there is only this one "Thread-1952", I assume those are not the reason...

编辑2:

另一张图片:详细的方法分析。这个 Timer-0 正在触发 QuantumToolkit 的脉冲,我假设它会保持屏幕开启。

And another image: Detailed method profiling. This Timer-0 is triggering pulses to the QuantumToolkit, which I assume keeps the screen on.

脉冲在大块中完成,以蓝色小块开始和结束:

The pulse is done in the big block, starting and ending with a blue small block:

我看到名字 MonocleTimer $ 1.run()V 弹出......也许这就是罪魁祸首。

And I've seen the name MonocleTimer$1.run ()V pop up... Maybe this is the culprit.

编辑3:

Charm Down BLE-Plugin完全删除:

Charm Down BLE-Plugin removed completely:

编辑4:

前段时间我为其他性能问题做了一个示例应用程序。
它显示完全相同的行为:

Some time ago I made an example application for other performance issues. It shows the exact same behaviour:

https://github.com/bgmf/example

推荐答案

经过多次测试后,清理了构建文件,我只能在Nexus 5上可靠地重现这一点。无论是否插入(调试模式),显示屏都会保持打开状态。
在Nexus 6上,此行为不再可再现。

After some more tests, cleaned-up build file, I was able to reproduce this reliably only on the Nexus 5. Regardless of whether it is plugin in (debug mode) or not, the display stays on. On a Nexus 6, this behavior was not reproducible anymore.

我将关闭此问题,因为我相信它 - 再次 - 与设备相关的问题。

I will close this issue, because I believe it's - once again - a device-related issue.

这篇关于JavaFXPorts - 电池消耗 - 屏幕始终打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆