From b17fc5d2e581a6d7178bc5b3ba21f0f138c4ccc5 Mon Sep 17 00:00:00 2001 From: lesl Date: Thu, 20 Feb 2020 19:32:17 +0800 Subject: [PATCH] wifi: Revise java doc to add more explanation 1. restoreSoftApBackupData - document return value and behavior if input is invalid 2. onCapabilityChanged - document behavior on register Bug: 149871866 Test: make docs frameworks/base/wifi/ Mergrd-In: I02085e614a35b0bf07dbc47cffe7255555a0deb8 Change-Id: I02085e614a35b0bf07dbc47cffe7255555a0deb8 (cherry picked from commit dba305d37d9d0214c231ae8a168f17268f4966c2) --- wifi/java/android/net/wifi/WifiManager.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 7d4b63285eea3..b1a4cac5864a6 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -3769,11 +3769,19 @@ public class WifiManager { } /** - * Registers a callback for Soft AP. See {@link SoftApCallback}. Caller will receive the current - * soft AP state and number of connected devices immediately after a successful call to this API - * via callback. Note that receiving an immediate WIFI_AP_STATE_FAILED value for soft AP state - * indicates that the latest attempt to start soft AP has failed. Caller can unregister a - * previously registered callback using {@link #unregisterSoftApCallback} + * Registers a callback for Soft AP. See {@link SoftApCallback}. Caller will receive the + * following callbacks on registration: + * + * These will be dispatched on registration to provide the caller with the current state + * (and are not an indication of any current change). Note that receiving an immediate + * WIFI_AP_STATE_FAILED value for soft AP state indicates that the latest attempt to start + * soft AP has failed. Caller can unregister a previously registered callback using + * {@link #unregisterSoftApCallback} *

* Applications should have the * {@link android.Manifest.permission#NETWORK_SETTINGS NETWORK_SETTINGS} permission. Callers @@ -5075,7 +5083,7 @@ public class WifiManager { } /** - * Returns soft ap config from the backed up data. + * Returns soft ap config from the backed up data or null if data is invalid. * @param data byte stream in the same format produced by {@link #retrieveSoftApBackupData()} * * @hide