Merge "CSD: enable sound dose in AudioService" into udc-dev
This commit is contained in:
@@ -2078,7 +2078,7 @@
|
||||
<integer name="config_audio_ring_vol_default">5</integer>
|
||||
|
||||
<!-- Enable sound dose computation and warnings -->
|
||||
<bool name="config_audio_csd_enabled_default">false</bool>
|
||||
<bool name="config_audio_csd_enabled_default">true</bool>
|
||||
|
||||
<!-- The default value for whether head tracking for
|
||||
spatial audio is enabled for a newly connected audio device -->
|
||||
|
||||
@@ -732,6 +732,16 @@ public class SoundDoseHelper {
|
||||
|
||||
private void initCsd() {
|
||||
if (!mEnableCsd) {
|
||||
final ISoundDose soundDose = AudioSystem.getSoundDoseInterface(mSoundDoseCallback);
|
||||
if (soundDose == null) {
|
||||
Log.w(TAG, "ISoundDose instance is null.");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
soundDose.disableCsd();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Cannot disable CSD", e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user