Merge "Add a system API to query hdmi system audio mode" into lmp-dev
This commit is contained in:
@@ -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() ...
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user