Loading core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -2954,6 +2954,7 @@ package android.hardware.hdmi { method public void sendKeyEvent(int, boolean); method public void sendVendorCommand(int, byte[], boolean); method public void setVendorCommandListener(@NonNull android.hardware.hdmi.HdmiControlManager.VendorCommandListener); method public void setVendorCommandListener(@NonNull android.hardware.hdmi.HdmiControlManager.VendorCommandListener, int); } public final class HdmiControlManager { Loading core/java/android/hardware/hdmi/HdmiClient.java +18 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ import android.util.Log; public abstract class HdmiClient { private static final String TAG = "HdmiClient"; private static final int UNKNOWN_VENDOR_ID = 0xFFFFFF; /* package */ final IHdmiControlService mService; private IHdmiVendorCommandListener mIHdmiVendorCommandListener; Loading Loading @@ -94,11 +96,25 @@ public abstract class HdmiClient { } /** * Sets a listener used to receive incoming vendor-specific command. * Sets a listener used to receive incoming vendor-specific command. This listener will only * receive {@code <Vendor Command>} but will not receive any {@code <Vendor Command with ID>} * messages. * * @param listener listener object */ public void setVendorCommandListener(@NonNull VendorCommandListener listener) { // Set the vendor ID to INVALID_VENDOR_ID. setVendorCommandListener(listener, UNKNOWN_VENDOR_ID); } /** * Sets a listener used to receive incoming vendor-specific command. * * @param listener listener object * @param vendorId The listener is interested in {@code <Vendor Command with ID>} received with * this vendorId and all {@code <Vendor Command>} messages. */ public void setVendorCommandListener(@NonNull VendorCommandListener listener, int vendorId) { if (listener == null) { throw new IllegalArgumentException("listener cannot be null"); } Loading @@ -107,7 +123,7 @@ public abstract class HdmiClient { } try { IHdmiVendorCommandListener wrappedListener = getListenerWrapper(listener); mService.addVendorCommandListener(wrappedListener, getDeviceType()); mService.addVendorCommandListener(wrappedListener, vendorId); mIHdmiVendorCommandListener = wrappedListener; } catch (RemoteException e) { Log.e(TAG, "failed to set vendor command listener: ", e); Loading core/java/android/hardware/hdmi/HdmiControlServiceWrapper.java +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ public final class HdmiControlServiceWrapper { } @Override public void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType) { HdmiControlServiceWrapper.this.addVendorCommandListener(listener, deviceType); public void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId) { HdmiControlServiceWrapper.this.addVendorCommandListener(listener, vendorId); } @Override Loading Loading @@ -471,7 +471,7 @@ public final class HdmiControlServiceWrapper { boolean hasVendorId) {} /** @hide */ public void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType) {} public void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId) {} /** @hide */ public void sendStandby(int deviceType, int deviceId) {} Loading core/java/android/hardware/hdmi/IHdmiControlService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ interface IHdmiControlService { void askRemoteDeviceToBecomeActiveSource(int physicalAddress); void sendVendorCommand(int deviceType, int targetAddress, in byte[] params, boolean hasVendorId); void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType); void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId); void sendStandby(int deviceType, int deviceId); void setHdmiRecordListener(IHdmiRecordListener callback); void startOneTouchRecord(int recorderAddress, in byte[] recordSource); Loading core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -288,9 +288,8 @@ public class HdmiAudioSystemClientTest { } @Override public void addVendorCommandListener(final IHdmiVendorCommandListener listener, final int deviceType) { } public void addVendorCommandListener( final IHdmiVendorCommandListener listener, final int vendorId) {} @Override public void sendVendorCommand(final int deviceType, final int targetAddress, Loading Loading
core/api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -2954,6 +2954,7 @@ package android.hardware.hdmi { method public void sendKeyEvent(int, boolean); method public void sendVendorCommand(int, byte[], boolean); method public void setVendorCommandListener(@NonNull android.hardware.hdmi.HdmiControlManager.VendorCommandListener); method public void setVendorCommandListener(@NonNull android.hardware.hdmi.HdmiControlManager.VendorCommandListener, int); } public final class HdmiControlManager { Loading
core/java/android/hardware/hdmi/HdmiClient.java +18 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ import android.util.Log; public abstract class HdmiClient { private static final String TAG = "HdmiClient"; private static final int UNKNOWN_VENDOR_ID = 0xFFFFFF; /* package */ final IHdmiControlService mService; private IHdmiVendorCommandListener mIHdmiVendorCommandListener; Loading Loading @@ -94,11 +96,25 @@ public abstract class HdmiClient { } /** * Sets a listener used to receive incoming vendor-specific command. * Sets a listener used to receive incoming vendor-specific command. This listener will only * receive {@code <Vendor Command>} but will not receive any {@code <Vendor Command with ID>} * messages. * * @param listener listener object */ public void setVendorCommandListener(@NonNull VendorCommandListener listener) { // Set the vendor ID to INVALID_VENDOR_ID. setVendorCommandListener(listener, UNKNOWN_VENDOR_ID); } /** * Sets a listener used to receive incoming vendor-specific command. * * @param listener listener object * @param vendorId The listener is interested in {@code <Vendor Command with ID>} received with * this vendorId and all {@code <Vendor Command>} messages. */ public void setVendorCommandListener(@NonNull VendorCommandListener listener, int vendorId) { if (listener == null) { throw new IllegalArgumentException("listener cannot be null"); } Loading @@ -107,7 +123,7 @@ public abstract class HdmiClient { } try { IHdmiVendorCommandListener wrappedListener = getListenerWrapper(listener); mService.addVendorCommandListener(wrappedListener, getDeviceType()); mService.addVendorCommandListener(wrappedListener, vendorId); mIHdmiVendorCommandListener = wrappedListener; } catch (RemoteException e) { Log.e(TAG, "failed to set vendor command listener: ", e); Loading
core/java/android/hardware/hdmi/HdmiControlServiceWrapper.java +3 −3 Original line number Diff line number Diff line Loading @@ -221,8 +221,8 @@ public final class HdmiControlServiceWrapper { } @Override public void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType) { HdmiControlServiceWrapper.this.addVendorCommandListener(listener, deviceType); public void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId) { HdmiControlServiceWrapper.this.addVendorCommandListener(listener, vendorId); } @Override Loading Loading @@ -471,7 +471,7 @@ public final class HdmiControlServiceWrapper { boolean hasVendorId) {} /** @hide */ public void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType) {} public void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId) {} /** @hide */ public void sendStandby(int deviceType, int deviceId) {} Loading
core/java/android/hardware/hdmi/IHdmiControlService.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,7 @@ interface IHdmiControlService { void askRemoteDeviceToBecomeActiveSource(int physicalAddress); void sendVendorCommand(int deviceType, int targetAddress, in byte[] params, boolean hasVendorId); void addVendorCommandListener(IHdmiVendorCommandListener listener, int deviceType); void addVendorCommandListener(IHdmiVendorCommandListener listener, int vendorId); void sendStandby(int deviceType, int deviceId); void setHdmiRecordListener(IHdmiRecordListener callback); void startOneTouchRecord(int recorderAddress, in byte[] recordSource); Loading
core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java +2 −3 Original line number Diff line number Diff line Loading @@ -288,9 +288,8 @@ public class HdmiAudioSystemClientTest { } @Override public void addVendorCommandListener(final IHdmiVendorCommandListener listener, final int deviceType) { } public void addVendorCommandListener( final IHdmiVendorCommandListener listener, final int vendorId) {} @Override public void sendVendorCommand(final int deviceType, final int targetAddress, Loading