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

Commit f741f347 authored by Amy's avatar Amy
Browse files

Add Nullable annotations for HDMI APIs.

Test: manual
Bug: 126700355
Change-Id: Id9b6f29c1aa58da32a2a81d38e986f496b69086c
parent 72f3872b
Loading
Loading
Loading
Loading
+3 −3
Original line number 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.HdmiSwitchClient getSwitchClient();
    method @Nullable public android.hardware.hdmi.HdmiTvClient getTvClient();
    method public boolean isRemoteDeviceConnected(android.hardware.hdmi.HdmiDeviceInfo);
    method public void powerOffRemoteDevice(android.hardware.hdmi.HdmiDeviceInfo);
    method public boolean isRemoteDeviceConnected(@NonNull 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 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);
    field public static final String ACTION_OSD_MESSAGE = "android.hardware.hdmi.action.OSD_MESSAGE";
    field public static final int AVR_VOLUME_MUTED = 101; // 0x65
+4 −3
Original line number 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 android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
@@ -456,7 +457,7 @@ public final class HdmiControlManager {
     * @hide
     */
    @SystemApi
    public void powerOffRemoteDevice(HdmiDeviceInfo deviceInfo) {
    public void powerOffRemoteDevice(@NonNull HdmiDeviceInfo deviceInfo) {
        Preconditions.checkNotNull(deviceInfo);
        try {
            mService.powerOffRemoteDevice(
@@ -495,7 +496,7 @@ public final class HdmiControlManager {
     * @hide
     */
    @SystemApi
    public void requestRemoteDeviceToBecomeActiveSource(HdmiDeviceInfo deviceInfo) {
    public void requestRemoteDeviceToBecomeActiveSource(@NonNull HdmiDeviceInfo deviceInfo) {
        Preconditions.checkNotNull(deviceInfo);
        try {
            mService.askRemoteDeviceToBecomeActiveSource(deviceInfo.getPhysicalAddress());
@@ -566,7 +567,7 @@ public final class HdmiControlManager {
     * @hide
     */
    @SystemApi
    public boolean isRemoteDeviceConnected(HdmiDeviceInfo targetDevice) {
    public boolean isRemoteDeviceConnected(@NonNull HdmiDeviceInfo targetDevice) {
        Preconditions.checkNotNull(targetDevice);
        mPhysicalAddress = getPhysicalAddress();
        if (mPhysicalAddress == INVALID_PHYSICAL_ADDRESS) {