From ce10ef80fc69a1c8ddab7fe0b95f7441beb94072 Mon Sep 17 00:00:00 2001 From: Andrew Solovay Date: Thu, 28 Mar 2019 15:56:45 -0700 Subject: [PATCH] docs: Javadoc cleanup There were a number of Javadoc style problems in the WifiNetworkSuggestion.Builder.build() docs, which caused some formatting problems. One specific problem worth noting: A {{ causes trouble at publish time, because it looks like the start of a Django directive. But escaping the { -- e.g. { -- doesn't work, because the Javadoc compiler helpfully escapes the *ampersand*, so the HTML output is "&#123", which renders on the page as "{" instead of "{". So putting a space between the two braces seems like the simplest solution. No code changes here, just Javadoc comment fixes. Tested by building the docs and staging to: http://go/dac-stage/reference/android/net/wifi/WifiNetworkSuggestion.Builder#build Screenshots (in case the stage gets overwritten): https://screenshot.googleplex.com/o4p7efFGCbJ.png (1) https://screenshot.googleplex.com/nkhEqU54LNb.png (2) Bug: 128536865 Test: make ds-docs (then build & stage) Change-Id: Ie04bc4dc517443a6899aba989beeb38b9299826e --- .../net/wifi/WifiNetworkSuggestion.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java index f5767453a6fb4..4262017323597 100644 --- a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java +++ b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java @@ -374,12 +374,11 @@ public final class WifiNetworkSuggestion implements Parcelable { } /** - * Create a network suggestion object use in + * Create a network suggestion object for use in * {@link WifiManager#addNetworkSuggestions(List)}. * - * See {@link WifiNetworkSuggestion}. - *

- * Note: Apps can set a combination of SSID using {@link #setSsid(String)} and BSSID + *

+ * Note: Apps can set a combination of SSID using {@link #setSsid(String)} and BSSID * using {@link #setBssid(MacAddress)} to provide more fine grained network suggestions to * the platform. *

@@ -387,7 +386,8 @@ public final class WifiNetworkSuggestion implements Parcelable { * For example: * To provide credentials for one open, one WPA2 and one WPA3 network with their * corresponding SSID's: - * {@code + * + *
{@code
          * final WifiNetworkSuggestion suggestion1 =
          *      new Builder()
          *      .setSsid("test111111")
@@ -403,19 +403,20 @@ public final class WifiNetworkSuggestion implements Parcelable {
          *      .setWpa3Passphrase("test6789")
          *      .build()
          * final List suggestionsList =
-         *      new ArrayList {{
+         *      new ArrayList { {
          *          add(suggestion1);
          *          add(suggestion2);
          *          add(suggestion3);
-         *      }};
+         *      } };
          * final WifiManager wifiManager =
          *      context.getSystemService(Context.WIFI_SERVICE);
          * wifiManager.addNetworkSuggestions(suggestionsList);
-         * ...
-         * }
+         * // ...
+         * }
* - * @return Instance of {@link WifiNetworkSuggestion}. - * @throws IllegalStateException on invalid params set. + * @return Instance of {@link WifiNetworkSuggestion} + * @throws IllegalStateException on invalid params set + * @see WifiNetworkSuggestion */ public @NonNull WifiNetworkSuggestion build() { if (mSsid == null) {