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

Commit 97e54a01 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Forward volume keys when system audio mode off and property set"

parents c749981c 00b976a7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package android.hardware.hdmi;

import android.annotation.Nullable;
import android.os.Handler;
import android.os.Looper;
import android.os.RemoteException;

import com.android.internal.annotations.VisibleForTesting;
@@ -52,7 +53,7 @@ public final class HdmiAudioSystemClient extends HdmiClient {
    @VisibleForTesting(visibility = Visibility.PACKAGE)
    public HdmiAudioSystemClient(IHdmiControlService service, @Nullable Handler handler) {
        super(service);
        mHandler = handler == null ? new Handler() : handler;
        mHandler = handler == null ? new Handler(Looper.getMainLooper()) : handler;
    }

    /** @hide */
+13 −0
Original line number Diff line number Diff line
@@ -387,6 +387,19 @@ public final class HdmiControlManager {
        }
    }

    /**
     * Gets whether the system is in system audio mode.
     *
     * @hide
     */
    public boolean getSystemAudioMode() {
        try {
            return mService.getSystemAudioMode();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Listener used to get hotplug event from HDMI port.
     */
+8 −0
Original line number Diff line number Diff line
@@ -30,6 +30,14 @@ public class RoSystemProperties {
    public static final String CONTROL_PRIVAPP_PERMISSIONS =
            SystemProperties.get("ro.control_privapp_permissions");

    /**
     * Property to indicate if a CEC audio device should forward volume keys when system audio
     * mode is off.
     */
    public static final boolean CEC_AUDIO_DEVICE_FORWARD_VOLUME_KEYS_SYSTEM_AUDIO_MODE_OFF =
            SystemProperties.getBoolean(
                    "ro.hdmi.cec_audio_device_forward_volume_keys_system_audio_mode_off", false);

    // ------ ro.config.* -------- //
    public static final boolean CONFIG_AVOID_GFX_ACCEL =
            SystemProperties.getBoolean("ro.config.avoid_gfx_accel", false);
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.server.hdmi;

import android.annotation.IntDef;
import android.hardware.hdmi.HdmiDeviceInfo;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

+5 −0
Original line number Diff line number Diff line
@@ -95,6 +95,11 @@ public class HdmiCecLocalDeviceAudioSystem extends HdmiCecLocalDevice {
        startQueuedActions();
    }

    @Override
    protected int findKeyReceiverAddress() {
        return Constants.ADDR_TV;
    }

    @VisibleForTesting
    protected void systemAudioControlOnPowerOn(
            int systemAudioOnPowerOnProp, boolean lastSystemAudioControlStatus) {
Loading