Skip to content
Commit f430140f authored by Yan Han's avatar Yan Han
Browse files

Validate all messages on construction

Refactors message validation in preparation for letting messages have
their own class:
- HdmiCecMessage is now built using a static factory method, which
validates the message and stores the result in an instance variable.
- HdmiCecMessageValidator is now static to remove its dependence on
HdmiControlService and allow HdmiCecMessage construction to use it.
- To achieve this, validation steps that are dependent on a
HdmiControlService instance are now done in HdmiControlService instead.
These are really verification steps instead of validation steps, as they
depend on the state a specific CEC network - for example, they include
checks for whether a physical address has a valid port on a local TV
device.

Change-Id: I5e8c0bbeb7069e3b5cc797d6fe98470ecddda438
Bug: 207359637
Test: atest com.android.server.hdmi
parent abbbf2ae
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