Allow creation of an audio effect on a session with no audio tracks.

This is necessary to allow creating and enabling an effect attached to a particular player
session before the playback is started. As a matter of fact, the implementation of the mediaplayer
does not create the AudioTrack before playback starts.

Change-Id: I1266e8885f9d756acc949303321aaac0fbf83e34
diff --git a/services/audioflinger/AudioFlinger.h b/services/audioflinger/AudioFlinger.h
index 8f667a3..5520551 100644
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -613,7 +613,15 @@
                     void disconnectEffect(const sp< EffectModule>& effect,
                                           const wp<EffectHandle>& handle);
 
-                    bool hasAudioSession(int sessionId);
+                    // return values for hasAudioSession (bit field)
+                    enum effect_state {
+                        EFFECT_SESSION = 0x1,   // the audio session corresponds to at least one
+                                                // effect
+                        TRACK_SESSION = 0x2     // the audio session corresponds to at least one
+                                                // track
+                    };
+
+                    uint32_t hasAudioSession(int sessionId);
                     sp<EffectChain> getEffectChain(int sessionId);
                     sp<EffectChain> getEffectChain_l(int sessionId);
                     status_t addEffectChain_l(const sp<EffectChain>& chain);
@@ -776,7 +784,8 @@
               int  nextUniqueId();
               status_t moveEffectChain_l(int session,
                                      AudioFlinger::PlaybackThread *srcThread,
-                                     AudioFlinger::PlaybackThread *dstThread);
+                                     AudioFlinger::PlaybackThread *dstThread,
+                                     bool reRegister);
 
     friend class AudioBuffer;