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

Commit d9efcf06 authored by Shivangi Dubey's avatar Shivangi Dubey
Browse files

Add DeviceState to device state callback

The device state callback currently accepts only the `wm.DeviceStateController.DeviceState` enum as a parameter.
However, the `hardware.devicestates.DeviceState` object is used extensively globally.

This change adds the `hardware.devicestates.DeviceState` object to the device state callback's parameter list.
This allows listeners to receive the `hardware.devicestates.DeviceState` object directly, instead of relying solely on the `wm.DeviceStateController.DeviceState` enum, which is limited to WM.

This is necessary because `DeviceStateAutoRotateSettingController` will require device state updates as `hardware.devicestates.DeviceState.identifier` to align with incoming IPC calls, as the `wm.DeviceStateController.DeviceState` enum is not available across processes.

Fixes: 407772602
Test: atest DeviceStateControllerTests DisplayContentTests DisplayRotationTests DeviceStateAutoRotateSettingControllerTest
Flag: EXEMPT refactor
Change-Id: Ie033caaf1bb810200689fa08db5c334f8c00f200
parent 5caaf025
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment