Merge "Improve IKE logging for 3GPP Extension use."
diff --git a/src/java/android/net/ipsec/ike/ike3gpp/Ike3gppParams.java b/src/java/android/net/ipsec/ike/ike3gpp/Ike3gppParams.java
index 96e0bd6..4c5506e 100644
--- a/src/java/android/net/ipsec/ike/ike3gpp/Ike3gppParams.java
+++ b/src/java/android/net/ipsec/ike/ike3gpp/Ike3gppParams.java
@@ -77,6 +77,16 @@
         return mPduSessionId == ((Ike3gppParams) o).mPduSessionId;
     }
 
+    @Override
+    public String toString() {
+        return new StringBuilder()
+                .append("Ike3gppParams={ ")
+                .append("pduSessionId=")
+                .append(String.format("%02X", mPduSessionId))
+                .append(" }")
+                .toString();
+    }
+
     /** This class can be used to incrementally construct an {@link Ike3gppParams}. */
     public static final class Builder {
         private byte mPduSessionId = PDU_SESSION_ID_UNSET;
diff --git a/src/java/com/android/internal/net/ipsec/ike/ike3gpp/Ike3gppExtensionExchange.java b/src/java/com/android/internal/net/ipsec/ike/ike3gpp/Ike3gppExtensionExchange.java
index 152fea9..cafbcf4 100644
--- a/src/java/com/android/internal/net/ipsec/ike/ike3gpp/Ike3gppExtensionExchange.java
+++ b/src/java/com/android/internal/net/ipsec/ike/ike3gpp/Ike3gppExtensionExchange.java
@@ -104,6 +104,8 @@
                 throw new IllegalArgumentException(
                         "Ike3gppDataListener must be unique for each IkeSession");
             }
+
+            logd("IKE 3GPP Extension enabled: " + mIke3gppExtension.getIke3gppParams());
         } else {
             mIke3gppIkeAuth = null;
         }
@@ -177,4 +179,8 @@
     private void logw(String msg) {
         getIkeLog().w(TAG, msg);
     }
+
+    private void logd(String msg) {
+        getIkeLog().d(TAG, msg);
+    }
 }