diff options
author | Michael W <baddaemon87@gmail.com> | 2016-10-22 12:58:59 +0200 |
---|---|---|
committer | Daniel Hillenbrand <codeworkx@cyanogenmod.org> | 2016-11-04 13:19:22 -0700 |
commit | 303d952cd0de0ddefae00046b964f8ea260ad017 (patch) | |
tree | 41d72b26c7cd27e10ca0862a6b35ee1a8b8b1d05 | |
parent | 6ec5081cc26454b9e8a6c059dcf23093bd517831 (diff) | |
download | android_packages_apps_AudioFX-303d952cd0de0ddefae00046b964f8ea260ad017.tar.gz android_packages_apps_AudioFX-303d952cd0de0ddefae00046b964f8ea260ad017.tar.bz2 android_packages_apps_AudioFX-303d952cd0de0ddefae00046b964f8ea260ad017.zip |
AudioFX: Fix possible RuntimeExceptioncm-14.0
Seems like mSessionManager is not initialised in some cases,
and the call to destroy() causes a RuntimeException.
Wrap with a null check to prevent the failure.
Change-Id: I4713e303f3223d60a6674a0a1096c7b7f37a9814
Reference: BugDumps 13-20161014-20 L#3
(cherry picked from commit 57e73c474580531513c016f76bb486190685173d)
-rw-r--r-- | src/org/cyanogenmod/audiofx/service/AudioFxService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/cyanogenmod/audiofx/service/AudioFxService.java b/src/org/cyanogenmod/audiofx/service/AudioFxService.java index 846c41b..1ec09da 100644 --- a/src/org/cyanogenmod/audiofx/service/AudioFxService.java +++ b/src/org/cyanogenmod/audiofx/service/AudioFxService.java @@ -288,7 +288,9 @@ public class AudioFxService extends Service if (DEBUG) Log.i(TAG, "Stopping service."); mOutputListener.removeCallback(this, mSessionManager, mDevicePrefs); - mSessionManager.onDestroy(); + if (mSessionManager != null) { + mSessionManager.onDestroy(); + } CMStatusBarManager.getInstance(this).removeTile(TILE_ID); |