dolby: Revert "Re-enable speaker virtualization after bootup"
No longer necessary Change-Id: Iac820eafa71ea3e4ccaad2bfa0fb76c37279a22a
This commit is contained in:
parent
975856cac5
commit
6a00b38d83
@ -8,8 +8,6 @@ package co.aospa.dolby.xiaomi;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.AudioDeviceAttributes;
|
||||
import android.media.AudioDeviceCallback;
|
||||
import android.media.AudioDeviceInfo;
|
||||
import android.media.AudioManager;
|
||||
@ -32,10 +30,6 @@ public final class DolbyUtils {
|
||||
private static final int EFFECT_PRIORITY = 100;
|
||||
private static final int VOLUME_LEVELER_AMOUNT = 2;
|
||||
|
||||
private static final AudioAttributes ATTRIBUTES_MEDIA = new AudioAttributes.Builder()
|
||||
.setUsage(AudioAttributes.USAGE_MEDIA)
|
||||
.build();
|
||||
|
||||
private static DolbyUtils mInstance;
|
||||
private DolbyAtmos mDolbyAtmos;
|
||||
private Context mContext;
|
||||
@ -91,19 +85,6 @@ public final class DolbyUtils {
|
||||
registerCallbacks(dsOn);
|
||||
if (dsOn)
|
||||
setCurrentProfile();
|
||||
|
||||
// Restore speaker virtualizer, because for some reason it isn't
|
||||
// enabled automatically at boot.
|
||||
final AudioDeviceAttributes device =
|
||||
mAudioManager.getDevicesForAttributes(ATTRIBUTES_MEDIA).get(0);
|
||||
final boolean isOnSpeaker = (device.getType() == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER);
|
||||
final boolean spkVirtEnabled = getSpeakerVirtualizerEnabled();
|
||||
dlog("isOnSpeaker=" + isOnSpeaker + " spkVirtEnabled=" + spkVirtEnabled);
|
||||
if (isOnSpeaker && spkVirtEnabled) {
|
||||
setSpeakerVirtualizerEnabled(false);
|
||||
setSpeakerVirtualizerEnabled(true);
|
||||
Log.i(TAG, "re-enabled speaker virtualizer");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkEffect() {
|
||||
|
Loading…
Reference in New Issue
Block a user