Extract methods to enter standby and standby mode
Also move initial standby from to threadLoop to avoid a race condition.
Change-Id: I65afca83c36fb41b983b3b1d3dab35d4029560e3
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 43c55a6..82d585d 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -1465,6 +1465,12 @@
private:
void clearSyncStartEvent();
+ // Enter standby if not already in standby, and set mStandby flag
+ void standby();
+
+ // Call the HAL standby method unconditionally, and don't change mStandby flag
+ void inputStandBy();
+
AudioStreamIn *mInput;
RecordTrack* mTrack;
sp<RecordTrack> mActiveTrack;