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

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

Fix ambiguous callback result for HdmiControlService#queryDisplayStatus

queryDisplayStatus's callback result uses values from two sets of
constants: result, and power status.

Issue: These sets overlap, which can cause the caller to think a CEC
device is not connected even though it reported its power status.
(Example: RESULT_SOURCE_NOT_AVAILABLE == POWER_STATUS_TRANSIENT_TO_ON)

This CL abandons the use of result constants, instead lumping them all
under POWER_STATUS_UNKNOWN, for the following reasons:
1. Internal callers of queryDisplayStatus do not distinguish between
the various result constants in their callback logic.
2. External callers of the HdmiPlaybackClient#queryDisplayStatus API
not recognize the result constants. According to the documentation for
HdmiPlaybackClient#DisplayStatusCallback, the API should only return
power status constants, not result constants.

Bug: 208757839
Test: atest HdmiControlServiceTest

Change-Id: I66409b603e81dcb3ab31954d62885570abf647ca
parent 73e564fe
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