am 75cd6c5e: Merge "Add a system API to query hdmi system audio mode" into lmp-dev

* commit '75cd6c5eb3e02101ddbb9fe21a641e312e5cc004':
  Add a system API to query hdmi system audio mode
This commit is contained in:
Terry Heo
2014-09-11 15:59:47 +00:00
committed by Android Git Automerger
3 changed files with 24 additions and 1 deletions

View File

@@ -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() ...
*/

View File

@@ -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

View File

@@ -201,6 +201,8 @@ interface IAudioService {
int setHdmiSystemAudioSupported(boolean on);
boolean registerAudioPolicy(in AudioPolicyConfig policyConfig, IBinder cb);
boolean isHdmiSystemAudioSupported();
boolean registerAudioPolicy(in AudioPolicyConfig policyConfig, IBinder cb);
oneway void unregisterAudioPolicyAsync(in IBinder cb);
}