TestNetworkInterface: improve documentation of newly added methods

This change addresses API review feedback and improves documentation.
Specifically, it adds documentation for the newly added getMtu() and
getMacAddress() methods, describes under which conditions the MAC
address is null and adds a short blurb on how (or in what context) this
class is used.

Test: TH
Bug: 236187143
Change-Id: I349897fd55f3085ce88c8b94c84ec636bb5eb2a6
diff --git a/framework/src/android/net/TestNetworkInterface.java b/framework/src/android/net/TestNetworkInterface.java
index 26200e1..4c4e2d9 100644
--- a/framework/src/android/net/TestNetworkInterface.java
+++ b/framework/src/android/net/TestNetworkInterface.java
@@ -29,6 +29,9 @@
 /**
  * This class is used to return the interface name, fd, MAC, and MTU of the test interface
  *
+ * TestNetworkInterfaces are created by TestNetworkService and provide a
+ * wrapper around a tun/tap interface that can be used in integration tests.
+ *
  * @hide
  */
 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
@@ -97,11 +100,25 @@
         return mInterfaceName;
     }
 
+    /**
+     * Returns the tap interface MacAddress.
+     *
+     * When TestNetworkInterface wraps a tun interface, the MAC address is null.
+     *
+     * @return the tap interface MAC address or null.
+     */
     @Nullable
     public MacAddress getMacAddress() {
         return mMacAddress;
     }
 
+    /**
+     * Returns the interface MTU.
+     *
+     * MTU defaults to 1500 if an error occurs.
+     *
+     * @return MTU in bytes.
+     */
     public int getMtu() {
         return mMtu;
     }