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

Skip to content
Commit bc9aec40 authored by Eric Lin's avatar Eric Lin
Browse files

Refactor DeviceStateManager service and tests.

This commit enhances the DeviceStateManagerService and its client-side
counterpart, DeviceStateManagerGlobal. The changes focus on improving
code quality, maintainability, and test reliability. JUnit assertions
in tests have been replaced with Truth, providing more informative
failure messages. Nullability annotations (@NonNull, @Nullable) have
been added to prevent potential null pointer exceptions. Java fields
are now marked as final where appropriate to improve code clarity and
signal immutability. The DeviceStateInfo class's Parcelable
implementation has been made more consistent, and handling of state
requests and callbacks in DeviceStateManagerGlobal has been streamlined.
The testng dependency has been removed from core device state tests.
These refinements prepare the DeviceStateManager codebase for future
improvements and align with best practices and style guidelines.

Bug: 337820752
Test: atest FrameworksCoreDeviceStateManagerTests
Test: atest FrameworksServicesTests:DeviceStateManagerServiceTest
Flag: TEST_ONLY
Change-Id: I9ab9b8dc51e2aa9d81f895394a584cb3175ae223
parent eff7ffab
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