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

Commit a485f9a4 authored by Amy Zhang's avatar Amy Zhang Committed by Android (Google) Code Review
Browse files

Merge "Add Nullable annotations for HDMI APIs."

parents ec995b8d f741f347
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1969,10 +1969,10 @@ package android.hardware.hdmi {
    method @Nullable public android.hardware.hdmi.HdmiPlaybackClient getPlaybackClient();
    method @Nullable public android.hardware.hdmi.HdmiPlaybackClient getPlaybackClient();
    method @Nullable public android.hardware.hdmi.HdmiSwitchClient getSwitchClient();
    method @Nullable public android.hardware.hdmi.HdmiSwitchClient getSwitchClient();
    method @Nullable public android.hardware.hdmi.HdmiTvClient getTvClient();
    method @Nullable public android.hardware.hdmi.HdmiTvClient getTvClient();
    method public boolean isRemoteDeviceConnected(android.hardware.hdmi.HdmiDeviceInfo);
    method public boolean isRemoteDeviceConnected(@NonNull android.hardware.hdmi.HdmiDeviceInfo);
    method public void powerOffRemoteDevice(android.hardware.hdmi.HdmiDeviceInfo);
    method public void powerOffRemoteDevice(@NonNull android.hardware.hdmi.HdmiDeviceInfo);
    method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void removeHotplugEventListener(android.hardware.hdmi.HdmiControlManager.HotplugEventListener);
    method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void removeHotplugEventListener(android.hardware.hdmi.HdmiControlManager.HotplugEventListener);
    method public void requestRemoteDeviceToBecomeActiveSource(android.hardware.hdmi.HdmiDeviceInfo);
    method public void requestRemoteDeviceToBecomeActiveSource(@NonNull android.hardware.hdmi.HdmiDeviceInfo);
    method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void setStandbyMode(boolean);
    method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void setStandbyMode(boolean);
    field public static final String ACTION_OSD_MESSAGE = "android.hardware.hdmi.action.OSD_MESSAGE";
    field public static final String ACTION_OSD_MESSAGE = "android.hardware.hdmi.action.OSD_MESSAGE";
    field public static final int AVR_VOLUME_MUTED = 101; // 0x65
    field public static final int AVR_VOLUME_MUTED = 101; // 0x65
+4 −3
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.hdmi;
import static com.android.internal.os.RoSystemProperties.PROPERTY_HDMI_IS_DEVICE_HDMI_CEC_SWITCH;
import static com.android.internal.os.RoSystemProperties.PROPERTY_HDMI_IS_DEVICE_HDMI_CEC_SWITCH;


import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.RequiresPermission;
@@ -456,7 +457,7 @@ public final class HdmiControlManager {
     * @hide
     * @hide
     */
     */
    @SystemApi
    @SystemApi
    public void powerOffRemoteDevice(HdmiDeviceInfo deviceInfo) {
    public void powerOffRemoteDevice(@NonNull HdmiDeviceInfo deviceInfo) {
        Preconditions.checkNotNull(deviceInfo);
        Preconditions.checkNotNull(deviceInfo);
        try {
        try {
            mService.powerOffRemoteDevice(
            mService.powerOffRemoteDevice(
@@ -495,7 +496,7 @@ public final class HdmiControlManager {
     * @hide
     * @hide
     */
     */
    @SystemApi
    @SystemApi
    public void requestRemoteDeviceToBecomeActiveSource(HdmiDeviceInfo deviceInfo) {
    public void requestRemoteDeviceToBecomeActiveSource(@NonNull HdmiDeviceInfo deviceInfo) {
        Preconditions.checkNotNull(deviceInfo);
        Preconditions.checkNotNull(deviceInfo);
        try {
        try {
            mService.askRemoteDeviceToBecomeActiveSource(deviceInfo.getPhysicalAddress());
            mService.askRemoteDeviceToBecomeActiveSource(deviceInfo.getPhysicalAddress());
@@ -566,7 +567,7 @@ public final class HdmiControlManager {
     * @hide
     * @hide
     */
     */
    @SystemApi
    @SystemApi
    public boolean isRemoteDeviceConnected(HdmiDeviceInfo targetDevice) {
    public boolean isRemoteDeviceConnected(@NonNull HdmiDeviceInfo targetDevice) {
        Preconditions.checkNotNull(targetDevice);
        Preconditions.checkNotNull(targetDevice);
        mPhysicalAddress = getPhysicalAddress();
        mPhysicalAddress = getPhysicalAddress();
        if (mPhysicalAddress == INVALID_PHYSICAL_ADDRESS) {
        if (mPhysicalAddress == INVALID_PHYSICAL_ADDRESS) {