Merge "Add IpClientCallbacks.onNewDhcpResults(DhcpResultsParcelable)"
am: 7595e62842
Change-Id: If543d73dff5c500da7f716d602a12a627dffb72b
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
package android.net.ip;
|
package android.net.ip;
|
||||||
|
|
||||||
import android.net.DhcpResults;
|
import android.net.DhcpResults;
|
||||||
|
import android.net.DhcpResultsParcelable;
|
||||||
import android.net.Layer2PacketParcelable;
|
import android.net.Layer2PacketParcelable;
|
||||||
import android.net.LinkProperties;
|
import android.net.LinkProperties;
|
||||||
|
|
||||||
@@ -68,6 +69,18 @@ public class IpClientCallbacks {
|
|||||||
*/
|
*/
|
||||||
public void onNewDhcpResults(DhcpResults dhcpResults) {}
|
public void onNewDhcpResults(DhcpResults dhcpResults) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback called when new DHCP results are available.
|
||||||
|
*
|
||||||
|
* <p>This is purely advisory and not an indication of provisioning success or failure. This is
|
||||||
|
* only here for callers that want to expose DHCPv4 results to other APIs
|
||||||
|
* (e.g., WifiInfo#setInetAddress).
|
||||||
|
*
|
||||||
|
* <p>DHCPv4 or static IPv4 configuration failure or success can be determined by whether or not
|
||||||
|
* the passed-in DhcpResults object is null.
|
||||||
|
*/
|
||||||
|
public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates that provisioning was successful.
|
* Indicates that provisioning was successful.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ public class IpClientUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {
|
public void onNewDhcpResults(DhcpResultsParcelable dhcpResults) {
|
||||||
mCb.onNewDhcpResults(fromStableParcelable(dhcpResults));
|
mCb.onNewDhcpResults(fromStableParcelable(dhcpResults));
|
||||||
|
mCb.onNewDhcpResults(dhcpResults);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user