How can I only turn off the LCD (without doing sleep) programmatically with Android?

I am trying to use Trepn to measure the power consumption of an Android device.

I found that the LCD consumes most of the power, so to get a relatively accurate power consumption, I better turn off the LCD only before the experiment and turn it on after the experiment.

How can I only turn off the LCD (non-sleep mode) programmatically with Android?

+6
source share
2 answers

Although it looks like you might already have an answer to your question, I wanted to know if you use Trepn to measure battery power or do you use power measurements on a rail? Rail measurements can simplify the isolation of individual equipment components.

Finally, for those who have not yet seen this, there is a good article on the Android website that provides recommendations for measuring the power of a component. https://source.android.com/devices/tech/power.html#component-power

  • Rick Schwartz - Trepn Product Manager
+2
source

Since you are using Trepn Profiler, it has a function to keep the device awake during profiling sessions, even if the screen is off.

This can be enabled in the Trepn settings:

Settings β†’ General Information; Turn on Get Wakelock when profiling.

Then you can start your test and press the device’s power button to turn off the screen. Trepn will support the processor for you.

In Trepn Profiler and above, this is in "Advanced Mode".

+2
source

Source: https://habr.com/ru/post/984686/


All Articles