Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 27a83db0 authored by Rupesh Bansal's avatar Rupesh Bansal
Browse files

Add DisplayPowerControllerInterface which will be used as a parent class

for new DisplayPowerController variant to incorporate the refactoring of
updatePowerState

We have introduced a new interface, DisplayPowerControllerInterface, and
the existing DisplayPowerController implements this class. In a
subsequent CL, we will introduce a new variant of DisplayPowerController which will have all
the suggested refactoring changes. We are using a sysprop
"persist.sys.use_new_display_power_controller", with default value 0,
to dynamically decide which variant is to be used.

By default, we will be using the existing DisplayPowerController.
Check the existing value
-> adb shell getprop persist.sys.use_new_display_power_controller // 1
means the new variant is being used, otherwise the old variant
Switch to new variant:
-> adb shell setprop persist.sys.use_new_display_power_controller "1" // Switches to the new
variant. Requries reboot after this

Bug: 241776244
Test: Manual
Test: atest DisplayPowerControllerTest
Change-Id: I314c66f4170996efbff24917608736ac33ff7e9c
parent b91f96a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment