CEC: Defer CEC actions until logical address is available
If logical address of device is not set, CEC actions will not work correctly because outgoing CEC message's source address will be wrong. In this case, CEC actions should be deferred until address allocation finishes. Bug: 28709242 Change-Id: I09e199c6144a5b341e3a6113022d0243fcfc3cf5
This commit is contained in:
@@ -650,7 +650,7 @@ abstract class HdmiCecLocalDevice {
|
||||
void addAndStartAction(final HdmiCecFeatureAction action) {
|
||||
assertRunOnServiceThread();
|
||||
mActions.add(action);
|
||||
if (mService.isPowerStandby()) {
|
||||
if (mService.isPowerStandby() || !mService.isAddressAllocated()) {
|
||||
Slog.i(TAG, "Not ready to start action. Queued for deferred start:" + action);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -641,6 +641,10 @@ public final class HdmiControlService extends SystemService {
|
||||
}
|
||||
}
|
||||
|
||||
boolean isAddressAllocated() {
|
||||
return mAddressAllocated;
|
||||
}
|
||||
|
||||
// Initialize HDMI port information. Combine the information from CEC and MHL HAL and
|
||||
// keep them in one place.
|
||||
@ServiceThreadOnly
|
||||
|
||||
Reference in New Issue
Block a user