Loading services/core/java/com/android/server/hdmi/DeviceSelectActionFromPlayback.java +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ final class DeviceSelectActionFromPlayback extends HdmiCecFeatureAction { mIsCec20 = isCec20; } private int getTargetAddress() { int getTargetAddress() { return mTarget.getLogicalAddress(); } Loading services/core/java/com/android/server/hdmi/HdmiCecController.java +2 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,8 @@ final class HdmiCecController { /** * Return the physical address of the device. * * <p>Declared as package-private. accessed by {@link HdmiControlService} only. * <p>Declared as package-private. accessed by {@link HdmiControlService} and * {@link HdmiCecNetwork} only. * * @return CEC physical address of the device. The range of success address * is between 0x0000 and 0xFFFF. If failed it returns -1 Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +18 −11 Original line number Diff line number Diff line Loading @@ -274,6 +274,13 @@ abstract class HdmiCecLocalDevice { return false; } // Clear all device info. @ServiceThreadOnly void clearDeviceInfoList() { assertRunOnServiceThread(); mService.getHdmiCecNetwork().clearDeviceList(); } @ServiceThreadOnly @Constants.HandleMessageResult protected final int onMessage(HdmiCecMessage message) { Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +38 −2 Original line number Diff line number Diff line Loading @@ -105,9 +105,42 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { } }); } launchDeviceDiscovery(); startQueuedActions(); } @ServiceThreadOnly private void launchDeviceDiscovery() { assertRunOnServiceThread(); clearDeviceInfoList(); DeviceDiscoveryAction action = new DeviceDiscoveryAction(this, new DeviceDiscoveryAction.DeviceDiscoveryCallback() { @Override public void onDeviceDiscoveryDone(List<HdmiDeviceInfo> deviceInfos) { for (HdmiDeviceInfo info : deviceInfos) { mService.getHdmiCecNetwork().addCecDevice(info); } // Since we removed all devices when it starts and device discovery action // does not poll local devices, we should put device info of local device // manually here. for (HdmiCecLocalDevice device : mService.getAllLocalDevices()) { synchronized (device.mLock) { mService.getHdmiCecNetwork().addCecDevice(device.getDeviceInfo()); } } List<HotplugDetectionAction> hotplugActions = getActions(HotplugDetectionAction.class); if (hotplugActions.isEmpty()) { addAndStartAction( new HotplugDetectionAction(HdmiCecLocalDevicePlayback.this)); } } }); addAndStartAction(action); } @Override @ServiceThreadOnly protected int getPreferredAddress() { Loading Loading @@ -450,9 +483,12 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { @Override @ServiceThreadOnly protected void disableDevice(boolean initiatedByCec, PendingActionClearedCallback callback) { super.disableDevice(initiatedByCec, callback); assertRunOnServiceThread(); removeAction(DeviceDiscoveryAction.class); removeAction(HotplugDetectionAction.class); removeAction(NewDeviceAction.class); super.disableDevice(initiatedByCec, callback); clearDeviceInfoList(); checkIfPendingActionsCleared(); } Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java +1 −8 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { mService.getHdmiCecNetwork().addCecDevice(info); } // Since we removed all devices when it's start and // Since we removed all devices when it starts and // device discovery action does not poll local devices, // we should put device info of local device manually here for (HdmiCecLocalDevice device : mService.getAllLocalDevices()) { Loading Loading @@ -734,13 +734,6 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { } } // Clear all device info. @ServiceThreadOnly private void clearDeviceInfoList() { assertRunOnServiceThread(); mService.getHdmiCecNetwork().clearDeviceList(); } @ServiceThreadOnly // Seq #32 void changeSystemAudioMode(boolean enabled, IHdmiControlCallback callback) { Loading Loading
services/core/java/com/android/server/hdmi/DeviceSelectActionFromPlayback.java +1 −1 Original line number Diff line number Diff line Loading @@ -102,7 +102,7 @@ final class DeviceSelectActionFromPlayback extends HdmiCecFeatureAction { mIsCec20 = isCec20; } private int getTargetAddress() { int getTargetAddress() { return mTarget.getLogicalAddress(); } Loading
services/core/java/com/android/server/hdmi/HdmiCecController.java +2 −1 Original line number Diff line number Diff line Loading @@ -324,7 +324,8 @@ final class HdmiCecController { /** * Return the physical address of the device. * * <p>Declared as package-private. accessed by {@link HdmiControlService} only. * <p>Declared as package-private. accessed by {@link HdmiControlService} and * {@link HdmiCecNetwork} only. * * @return CEC physical address of the device. The range of success address * is between 0x0000 and 0xFFFF. If failed it returns -1 Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +18 −11 Original line number Diff line number Diff line Loading @@ -274,6 +274,13 @@ abstract class HdmiCecLocalDevice { return false; } // Clear all device info. @ServiceThreadOnly void clearDeviceInfoList() { assertRunOnServiceThread(); mService.getHdmiCecNetwork().clearDeviceList(); } @ServiceThreadOnly @Constants.HandleMessageResult protected final int onMessage(HdmiCecMessage message) { Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +38 −2 Original line number Diff line number Diff line Loading @@ -105,9 +105,42 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { } }); } launchDeviceDiscovery(); startQueuedActions(); } @ServiceThreadOnly private void launchDeviceDiscovery() { assertRunOnServiceThread(); clearDeviceInfoList(); DeviceDiscoveryAction action = new DeviceDiscoveryAction(this, new DeviceDiscoveryAction.DeviceDiscoveryCallback() { @Override public void onDeviceDiscoveryDone(List<HdmiDeviceInfo> deviceInfos) { for (HdmiDeviceInfo info : deviceInfos) { mService.getHdmiCecNetwork().addCecDevice(info); } // Since we removed all devices when it starts and device discovery action // does not poll local devices, we should put device info of local device // manually here. for (HdmiCecLocalDevice device : mService.getAllLocalDevices()) { synchronized (device.mLock) { mService.getHdmiCecNetwork().addCecDevice(device.getDeviceInfo()); } } List<HotplugDetectionAction> hotplugActions = getActions(HotplugDetectionAction.class); if (hotplugActions.isEmpty()) { addAndStartAction( new HotplugDetectionAction(HdmiCecLocalDevicePlayback.this)); } } }); addAndStartAction(action); } @Override @ServiceThreadOnly protected int getPreferredAddress() { Loading Loading @@ -450,9 +483,12 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { @Override @ServiceThreadOnly protected void disableDevice(boolean initiatedByCec, PendingActionClearedCallback callback) { super.disableDevice(initiatedByCec, callback); assertRunOnServiceThread(); removeAction(DeviceDiscoveryAction.class); removeAction(HotplugDetectionAction.class); removeAction(NewDeviceAction.class); super.disableDevice(initiatedByCec, callback); clearDeviceInfoList(); checkIfPendingActionsCleared(); } Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java +1 −8 Original line number Diff line number Diff line Loading @@ -685,7 +685,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { mService.getHdmiCecNetwork().addCecDevice(info); } // Since we removed all devices when it's start and // Since we removed all devices when it starts and // device discovery action does not poll local devices, // we should put device info of local device manually here for (HdmiCecLocalDevice device : mService.getAllLocalDevices()) { Loading Loading @@ -734,13 +734,6 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { } } // Clear all device info. @ServiceThreadOnly private void clearDeviceInfoList() { assertRunOnServiceThread(); mService.getHdmiCecNetwork().clearDeviceList(); } @ServiceThreadOnly // Seq #32 void changeSystemAudioMode(boolean enabled, IHdmiControlCallback callback) { Loading