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
Loading
Please register or sign in to comment