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

Commit d608f3ab authored by Terry Heo's avatar Terry Heo Committed by Android (Google) Code Review
Browse files

Merge "Add a system API to query hdmi system audio mode" into lmp-dev

parents 19ba61af e7d6d97f
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.media;
import android.Manifest;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
import android.app.PendingIntent;
import android.bluetooth.BluetoothDevice;
import android.content.ComponentName;
@@ -3157,6 +3158,21 @@ public class AudioManager {
        }
    }

    /**
     * Returns true if Hdmi Cec system audio mode is supported.
     *
     * @hide
     */
    @SystemApi
    public boolean isHdmiSystemAudioSupported() {
        try {
            return getService().isHdmiSystemAudioSupported();
        } catch (RemoteException e) {
            Log.w(TAG, "Error querying system audio mode", e);
            return false;
        }
    }

    /**
     * Return codes for listAudioPorts(), createAudioPatch() ...
     */
+5 −0
Original line number Diff line number Diff line
@@ -5105,6 +5105,11 @@ public class AudioService extends IAudioService.Stub {
        return device;
    }

    @Override
    public boolean isHdmiSystemAudioSupported() {
        return mHdmiSystemAudioSupported;
    }

    //==========================================================================================
    // Camera shutter sound policy.
    // config_camera_sound_forced configuration option in config.xml defines if the camera shutter
+3 −1
Original line number Diff line number Diff line
@@ -201,6 +201,8 @@ interface IAudioService {

    int setHdmiSystemAudioSupported(boolean on);

    boolean isHdmiSystemAudioSupported();

    boolean registerAudioPolicy(in AudioPolicyConfig policyConfig, IBinder cb);
    oneway void unregisterAudioPolicyAsync(in IBinder cb);
}