Loading core/java/android/hardware/hdmi/HdmiPlaybackClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public final class HdmiPlaybackClient extends HdmiClient { } } @Override public int getDeviceType() { return HdmiCecDeviceInfo.DEVICE_PLAYBACK; } Loading @@ -93,7 +94,6 @@ public final class HdmiPlaybackClient extends HdmiClient { * of the result */ public void queryDisplayStatus(DisplayStatusCallback callback) { // TODO: PendingResult. try { mService.queryDisplayStatus(getCallbackWrapper(callback)); } catch (RemoteException e) { Loading services/core/java/com/android/server/hdmi/ActiveSourceHandler.java +0 −4 Original line number Diff line number Diff line Loading @@ -101,10 +101,6 @@ final class ActiveSourceHandler { return mSource.getDeviceInfo().getLogicalAddress(); } private final int getSourcePath() { return mSource.getDeviceInfo().getPhysicalAddress(); } private void invokeCallback(int result) { if (mCallback == null) { return; Loading services/core/java/com/android/server/hdmi/Constants.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.hardware.hdmi.HdmiCecDeviceInfo; /** * Defines constants related to HDMI-CEC protocol internal implementation. * If a constant will be used in the public api, it should be located in * {@link android.hardware.hdmi.HdmiCec}. * {@link android.hardware.hdmi.HdmiControlManager}. */ final class Constants { Loading services/core/java/com/android/server/hdmi/DevicePowerStatusAction.java +7 −7 Original line number Diff line number Diff line Loading @@ -17,19 +17,19 @@ package com.android.server.hdmi; */ import android.hardware.hdmi.HdmiControlManager; import android.hardware.hdmi.HdmiPlaybackClient; import android.hardware.hdmi.HdmiPlaybackClient.DisplayStatusCallback; import android.hardware.hdmi.IHdmiControlCallback; import android.os.RemoteException; import android.util.Slog; /** * Feature action that queries the power status of other device. * * This action is initiated via {@link HdmiControlManager#queryDisplayStatus()} from * the Android system working as playback device to get the power status of TV device. * * <p>Package-private, accessed by {@link HdmiControlService} only. * Feature action that queries the power status of other device. This action is initiated via * {@link HdmiPlaybackClient#queryDisplayStatus(DisplayStatusCallback)} from the Android system * working as playback device to get the power status of TV device. * <p> * Package-private, accessed by {@link HdmiControlService} only. */ final class DevicePowerStatusAction extends FeatureAction { private static final String TAG = "DevicePowerStatusAction"; Loading services/core/java/com/android/server/hdmi/HdmiCecController.java +10 −12 Original line number Diff line number Diff line Loading @@ -65,16 +65,6 @@ final class HdmiCecController { private static final byte[] EMPTY_BODY = EmptyArray.BYTE; // A message to pass cec send command to IO looper. private static final int MSG_SEND_CEC_COMMAND = 1; // A message to delegate logical allocation to IO looper. private static final int MSG_ALLOCATE_LOGICAL_ADDRESS = 2; // Message types to handle incoming message in main service looper. private final static int MSG_RECEIVE_CEC_COMMAND = 1; // A message to report allocated logical address to main control looper. private final static int MSG_REPORT_LOGICAL_ADDRESS = 2; private static final int NUM_LOGICAL_ADDRESS = 16; // Predicate for whether the given logical address is remote device's one or not. Loading Loading @@ -196,7 +186,15 @@ final class HdmiCecController { int curAddress = (startAddress + i) % NUM_LOGICAL_ADDRESS; if (curAddress != Constants.ADDR_UNREGISTERED && deviceType == HdmiUtils.getTypeFromAddress(curAddress)) { if (!sendPollMessage(curAddress, curAddress, HdmiConfig.ADDRESS_ALLOCATION_RETRY)) { int failedPollingCount = 0; for (int j = 0; j < HdmiConfig.ADDRESS_ALLOCATION_RETRY; ++j) { if (!sendPollMessage(curAddress, curAddress, 1)) { failedPollingCount++; } } // Pick logical address if failed ratio is more than a half of all retries. if (failedPollingCount * 2 > HdmiConfig.ADDRESS_ALLOCATION_RETRY) { logicalAddress = curAddress; break; } Loading Loading
core/java/android/hardware/hdmi/HdmiPlaybackClient.java +1 −1 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ public final class HdmiPlaybackClient extends HdmiClient { } } @Override public int getDeviceType() { return HdmiCecDeviceInfo.DEVICE_PLAYBACK; } Loading @@ -93,7 +94,6 @@ public final class HdmiPlaybackClient extends HdmiClient { * of the result */ public void queryDisplayStatus(DisplayStatusCallback callback) { // TODO: PendingResult. try { mService.queryDisplayStatus(getCallbackWrapper(callback)); } catch (RemoteException e) { Loading
services/core/java/com/android/server/hdmi/ActiveSourceHandler.java +0 −4 Original line number Diff line number Diff line Loading @@ -101,10 +101,6 @@ final class ActiveSourceHandler { return mSource.getDeviceInfo().getLogicalAddress(); } private final int getSourcePath() { return mSource.getDeviceInfo().getPhysicalAddress(); } private void invokeCallback(int result) { if (mCallback == null) { return; Loading
services/core/java/com/android/server/hdmi/Constants.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import android.hardware.hdmi.HdmiCecDeviceInfo; /** * Defines constants related to HDMI-CEC protocol internal implementation. * If a constant will be used in the public api, it should be located in * {@link android.hardware.hdmi.HdmiCec}. * {@link android.hardware.hdmi.HdmiControlManager}. */ final class Constants { Loading
services/core/java/com/android/server/hdmi/DevicePowerStatusAction.java +7 −7 Original line number Diff line number Diff line Loading @@ -17,19 +17,19 @@ package com.android.server.hdmi; */ import android.hardware.hdmi.HdmiControlManager; import android.hardware.hdmi.HdmiPlaybackClient; import android.hardware.hdmi.HdmiPlaybackClient.DisplayStatusCallback; import android.hardware.hdmi.IHdmiControlCallback; import android.os.RemoteException; import android.util.Slog; /** * Feature action that queries the power status of other device. * * This action is initiated via {@link HdmiControlManager#queryDisplayStatus()} from * the Android system working as playback device to get the power status of TV device. * * <p>Package-private, accessed by {@link HdmiControlService} only. * Feature action that queries the power status of other device. This action is initiated via * {@link HdmiPlaybackClient#queryDisplayStatus(DisplayStatusCallback)} from the Android system * working as playback device to get the power status of TV device. * <p> * Package-private, accessed by {@link HdmiControlService} only. */ final class DevicePowerStatusAction extends FeatureAction { private static final String TAG = "DevicePowerStatusAction"; Loading
services/core/java/com/android/server/hdmi/HdmiCecController.java +10 −12 Original line number Diff line number Diff line Loading @@ -65,16 +65,6 @@ final class HdmiCecController { private static final byte[] EMPTY_BODY = EmptyArray.BYTE; // A message to pass cec send command to IO looper. private static final int MSG_SEND_CEC_COMMAND = 1; // A message to delegate logical allocation to IO looper. private static final int MSG_ALLOCATE_LOGICAL_ADDRESS = 2; // Message types to handle incoming message in main service looper. private final static int MSG_RECEIVE_CEC_COMMAND = 1; // A message to report allocated logical address to main control looper. private final static int MSG_REPORT_LOGICAL_ADDRESS = 2; private static final int NUM_LOGICAL_ADDRESS = 16; // Predicate for whether the given logical address is remote device's one or not. Loading Loading @@ -196,7 +186,15 @@ final class HdmiCecController { int curAddress = (startAddress + i) % NUM_LOGICAL_ADDRESS; if (curAddress != Constants.ADDR_UNREGISTERED && deviceType == HdmiUtils.getTypeFromAddress(curAddress)) { if (!sendPollMessage(curAddress, curAddress, HdmiConfig.ADDRESS_ALLOCATION_RETRY)) { int failedPollingCount = 0; for (int j = 0; j < HdmiConfig.ADDRESS_ALLOCATION_RETRY; ++j) { if (!sendPollMessage(curAddress, curAddress, 1)) { failedPollingCount++; } } // Pick logical address if failed ratio is more than a half of all retries. if (failedPollingCount * 2 > HdmiConfig.ADDRESS_ALLOCATION_RETRY) { logicalAddress = curAddress; break; } Loading