diff options
author | BeYkeRYkt <beykerykt@gmail.com> | 2019-01-27 05:19:10 +0900 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2019-09-22 08:55:29 +0200 |
commit | a6a9ea2abc91b385abfe180727fae4ea79619a23 (patch) | |
tree | cd9d86a62db827715bfbd040a8370a1fa700d0df | |
parent | 2506d5db54fbfb8eea943b9b752c9c26e427a44f (diff) |
AudioFX: Set a correct device during the service start
* Fixes the use of effects that do not match the current audio output after the
service starts when using multiple audio outputs.
Change-Id: I7ccb51ff242bf29377f90f236554c01ee5dc402b
-rw-r--r-- | src/org/lineageos/audiofx/service/AudioFxService.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/lineageos/audiofx/service/AudioFxService.java b/src/org/lineageos/audiofx/service/AudioFxService.java index 0c3aff1..a9e71ea 100644 --- a/src/org/lineageos/audiofx/service/AudioFxService.java +++ b/src/org/lineageos/audiofx/service/AudioFxService.java @@ -126,6 +126,8 @@ public class AudioFxService extends Service mOutputListener = new AudioOutputChangeListener(getApplicationContext(), mHandler); mOutputListener.addCallback(this); + mCurrentDevice = mOutputListener.getCurrentDevice(); + mDevicePrefs = new DevicePreferenceManager(getApplicationContext(), mCurrentDevice); if (!mDevicePrefs.initDefaults()) { stopSelf(); |