From d702a568cb62e5aebe048147350bb3c76f9386ba Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 2 Mar 2015 15:51:38 -0800 Subject: Pull out commandToString() from FastMixerDumpState.cpp to FastThreadState.cpp, FastMixerState.cpp, and FastCaptureState.cpp Change-Id: I872efb211e8a0335c42906367859d3674340e374 --- services/audioflinger/FastThreadState.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'services/audioflinger/FastThreadState.cpp') diff --git a/services/audioflinger/FastThreadState.cpp b/services/audioflinger/FastThreadState.cpp index e6cf85c..ad5f31f 100644 --- a/services/audioflinger/FastThreadState.cpp +++ b/services/audioflinger/FastThreadState.cpp @@ -29,4 +29,16 @@ FastThreadState::~FastThreadState() { } +// static +const char *FastThreadState::commandToString(FastThreadState::Command command) +{ + switch (command) { + case FastThreadState::INITIAL: return "INITIAL"; + case FastThreadState::HOT_IDLE: return "HOT_IDLE"; + case FastThreadState::COLD_IDLE: return "COLD_IDLE"; + case FastThreadState::EXIT: return "EXIT"; + } + return NULL; +} + } // namespace android -- cgit v1.1