Added dump support to more telephony components.
Jack Yu [Mon, 28 Dec 2015 23:31:48 +0000 (15:31 -0800)]
Added dump support to Ims components and also improved service
state tracker dump support.

bug: 25955373
Change-Id: I25578d251382eeba22c59925be4d878c7bd7b469

src/java/com/android/ims/ImsManager.java

index 30042ac..c43d843 100644 (file)
@@ -44,6 +44,8 @@ import com.android.ims.internal.IImsUt;
 import com.android.ims.internal.ImsCallSession;
 import com.android.ims.internal.IImsConfig;
 
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
 import java.util.HashMap;
 
 /**
@@ -1364,4 +1366,29 @@ public class ImsManager {
         ImsManager.updateImsServiceConfig(context,
                 SubscriptionManager.getDefaultVoicePhoneId(), true);
     }
+
+    public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+        pw.println("ImsManager:");
+        pw.println("  mPhoneId = " + mPhoneId);
+        pw.println("  mConfigUpdated = " + mConfigUpdated);
+        pw.println("  mImsService = " + mImsService);
+
+        pw.println("  isGbaValid = " + isGbaValid(mContext));
+        pw.println("  isImsTurnOffAllowed = " + isImsTurnOffAllowed());
+        pw.println("  isNonTtyOrTtyOnVolteEnabled = " + isNonTtyOrTtyOnVolteEnabled(mContext));
+
+        pw.println("  isVolteEnabledByPlatform = " + isVolteEnabledByPlatform(mContext));
+        pw.println("  isVolteProvisionedOnDevice = " + isVolteProvisionedOnDevice(mContext));
+        pw.println("  isEnhanced4gLteModeSettingEnabledByUser = " +
+                isEnhanced4gLteModeSettingEnabledByUser(mContext));
+        pw.println("  isVtEnabledByPlatform = " + isVtEnabledByPlatform(mContext));
+        pw.println("  isVtEnabledByUser = " + isVtEnabledByUser(mContext));
+
+        pw.println("  isWfcEnabledByPlatform = " + isWfcEnabledByPlatform(mContext));
+        pw.println("  isWfcEnabledByUser = " + isWfcEnabledByUser(mContext));
+        pw.println("  getWfcMode = " + getWfcMode(mContext));
+        pw.println("  isWfcRoamingEnabledByUser = " + isWfcRoamingEnabledByUser(mContext));
+
+        pw.flush();
+    }
 }