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

Commit 9727b332 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Android (Google) Code Review
Browse files

Merge "CEC: Hook up device select API to MHL device RAP" into lmp-dev

parents a890ec19 87f22a28
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -416,7 +416,8 @@ public class HdmiDeviceInfo implements Parcelable {
        switch (mHdmiDeviceType) {
            case HDMI_DEVICE_TYPE_CEC:
                s.append("CEC: ");
                s.append("logical_address: ").append(mLogicalAddress).append(" ");
                s.append("logical_address: ").append(String.format("0x%02X", mLogicalAddress));
                s.append(" ");
                s.append("device_type: ").append(mDeviceType).append(" ");
                s.append("vendor_id: ").append(mVendorId).append(" ");
                s.append("display_name: ").append(mDisplayName).append(" ");
@@ -424,8 +425,8 @@ public class HdmiDeviceInfo implements Parcelable {
                break;
            case HDMI_DEVICE_TYPE_MHL:
                s.append("MHL: ");
                s.append("device_id: ").append(mDeviceId).append(" ");
                s.append("adopter_id: ").append(mAdopterId).append(" ");
                s.append("device_id: ").append(String.format("0x%04X", mDeviceId)).append(" ");
                s.append("adopter_id: ").append(String.format("0x%04X", mAdopterId)).append(" ");
                break;

            case HDMI_DEVICE_TYPE_HARDWARE:
@@ -434,7 +435,8 @@ public class HdmiDeviceInfo implements Parcelable {
            default:
                return "";
        }
        s.append("physical_address: ").append(String.format("0x04X", mPhysicalAddress)).append(" ");
        s.append("physical_address: ").append(String.format("0x%04X", mPhysicalAddress));
        s.append(" ");
        s.append("port_id: ").append(mPortId);
        return s.toString();
    }
+0 −1
Original line number Diff line number Diff line
@@ -178,7 +178,6 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
            invokeCallback(callback, HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE);
            return;
        }
        // TODO: Handle MHL device
        int targetAddress = targetDevice.getLogicalAddress();
        ActiveSource active = getActiveSource();
        if (active.isValid() && targetAddress == active.logicalAddress) {
+11 −0
Original line number Diff line number Diff line
@@ -1005,6 +1005,17 @@ public final class HdmiControlService extends SystemService {
                        invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE);
                        return;
                    }
                    if (mMhlController != null) {
                        HdmiMhlLocalDevice device = mMhlController.getLocalDeviceById(deviceId);
                        if (device != null) {
                            // Upon selecting MHL device, we send RAP[Content On] to wake up
                            // the connected mobile device, start routing control to switch ports.
                            // callback is handled by MHL action.
                            device.turnOn(callback);
                            tv.doManualPortSwitching(device.getInfo().getPortId(), null);
                            return;
                        }
                    }
                    tv.deviceSelect(deviceId, callback);
                }
            });