audio effect: fix registration of default device effects

Bug: 268441977
Test: dumpsys media.audio_policy shows registered default device
effect(s)
dumpsys media.audio_flinger shows enabled / registered default device
effect(s).

Device effects are initialized asynchronously when audio policy service
is created. During the initialization, these effects will register to
audio policy service. However, the service is declared available only at
the late init.
It leads to erratic registration of default device effects.

Change-Id: Ia6e2c4f05ef600ab1e47d78505e5cae9df5c525d
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
diff --git a/services/audioflinger/Effects.cpp b/services/audioflinger/Effects.cpp
index c8998ad..2a33991 100644
--- a/services/audioflinger/Effects.cpp
+++ b/services/audioflinger/Effects.cpp
@@ -512,11 +512,12 @@
     if (!locked) {
         result.append("\t\tCould not lock Fx mutex:\n");
     }
-
-    result.append("\t\tSession State Registered Enabled Suspended:\n");
-    result.appendFormat("\t\t%05d   %03d   %s          %s       %s\n",
-            mSessionId, mState, mPolicyRegistered ? "y" : "n",
-            mPolicyEnabled ? "y" : "n", mSuspended ? "y" : "n");
+    bool isInternal = isInternal_l();
+    result.append("\t\tSession State Registered Internal Enabled Suspended:\n");
+    result.appendFormat("\t\t%05d   %03d   %s          %s        %s       %s\n",
+            mSessionId, mState, mPolicyRegistered ? "y" : "n", isInternal ? "y" : "n",
+            ((isInternal && isEnabled()) || (!isInternal && mPolicyEnabled)) ? "y" : "n",
+            mSuspended ? "y" : "n");
 
     result.append("\t\tDescriptor:\n");
     char uuidStr[64];