summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Threads.h
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2015-05-08 10:50:03 -0700
committerEric Laurent <elaurent@google.com>2015-05-08 13:23:51 -0700
commitf6870aefc5e31d4220f3778c4e79ff34a61f48ad (patch)
tree6943c86c7143ffc113d91b8ed7a34d75ab183434 /services/audioflinger/Threads.h
parent70c75d8c15707d5eade38fe3e622f8500c29556b (diff)
downloadframeworks_av-f6870aefc5e31d4220f3778c4e79ff34a61f48ad.zip
frameworks_av-f6870aefc5e31d4220f3778c4e79ff34a61f48ad.tar.gz
frameworks_av-f6870aefc5e31d4220f3778c4e79ff34a61f48ad.tar.bz2
audio flinger: fix fuzz test crash
Clear output stream pointer in duplicating thread when the main output to which it is attached is closed. Also do not forward master mute and volume commands to duplicating threads as this is not applicable. Also fix logic in AudioFlinger::primaryPlaybackThread_l() that could accidentally return a duplicating thread. This never happens because the primary thread is always first in the list. Bug: 20731946. Change-Id: Ic8869699836920351b23d09544c50a258d3fb585
Diffstat (limited to 'services/audioflinger/Threads.h')
-rw-r--r--services/audioflinger/Threads.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 0a5597f..37bacae 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -230,6 +230,8 @@ public:
// static externally-visible
type_t type() const { return mType; }
+ bool isDuplicating() const { return (mType == DUPLICATING); }
+
audio_io_handle_t id() const { return mId;}
// dynamic externally-visible