summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2016-09-07 16:58:39 -0700
committergitbuildkicker <android-build@google.com>2016-09-27 15:56:39 -0700
commitd8cf9aa813be5363fb5425b4f818a267edd5e750 (patch)
tree32dee67c0b6fd952baec8ca54bda27c1d9e67f16 /include
parentace612c5f838944d1b88be18e317709e640becc2 (diff)
downloadframeworks_av-d8cf9aa813be5363fb5425b4f818a267edd5e750.zip
frameworks_av-d8cf9aa813be5363fb5425b4f818a267edd5e750.tar.gz
frameworks_av-d8cf9aa813be5363fb5425b4f818a267edd5e750.tar.bz2
SoundTrigger: get service by value.
Get strong pointer to service interface by value and not reference to prevent race conditions where the service pointer can be cleared by another thread while in use. Bug: 30907212 Change-Id: I6f02ec3fd1e6392b842b334e1cc4f9aa23916009 (cherry picked from commit 3b01b3019b1c62132792a1a94e2dc1f7cfc84f2e)
Diffstat (limited to 'include')
-rw-r--r--include/soundtrigger/SoundTrigger.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/soundtrigger/SoundTrigger.h b/include/soundtrigger/SoundTrigger.h
index bf5e1de..9a05cac 100644
--- a/include/soundtrigger/SoundTrigger.h
+++ b/include/soundtrigger/SoundTrigger.h
@@ -68,7 +68,7 @@ public:
private:
SoundTrigger(sound_trigger_module_handle_t module,
const sp<SoundTriggerCallback>&);
- static const sp<ISoundTriggerHwService>& getSoundTriggerHwService();
+ static const sp<ISoundTriggerHwService> getSoundTriggerHwService();
Mutex mLock;
sp<ISoundTrigger> mISoundTrigger;