Merge "Expose WifiP2pDevice.update() as public API"
This commit is contained in:
@@ -30569,6 +30569,7 @@ package android.net.wifi.p2p {
|
||||
method @Nullable public android.net.wifi.p2p.WifiP2pWfdInfo getWfdInfo();
|
||||
method public boolean isGroupOwner();
|
||||
method public boolean isServiceDiscoveryCapable();
|
||||
method public void update(@NonNull android.net.wifi.p2p.WifiP2pDevice);
|
||||
method public boolean wpsDisplaySupported();
|
||||
method public boolean wpsKeypadSupported();
|
||||
method public boolean wpsPbcSupported();
|
||||
|
||||
@@ -508,8 +508,7 @@ final class WifiDisplayController implements DumpUtils.Dump {
|
||||
Slog.d(TAG, "updateDesiredDevice: new information "
|
||||
+ describeWifiP2pDevice(device));
|
||||
}
|
||||
mDesiredDevice.updateSupplicantDetails(device);
|
||||
mDesiredDevice.status = device.status;
|
||||
mDesiredDevice.update(device);
|
||||
if (mAdvertisedDisplay != null
|
||||
&& mAdvertisedDisplay.getDeviceAddress().equals(address)) {
|
||||
readvertiseDisplay(createWifiDisplay(mDesiredDevice));
|
||||
|
||||
@@ -286,14 +286,12 @@ public class WifiP2pDevice implements Parcelable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Update device details. This will throw an exception if the device address does not match.
|
||||
* Update this device's details using another {@link WifiP2pDevice} instance.
|
||||
* This will throw an exception if the device address does not match.
|
||||
*
|
||||
* @param device to be updated
|
||||
* @param device another instance of {@link WifiP2pDevice} used to update this instance.
|
||||
* @throws IllegalArgumentException if the device is null or the device address does not match
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
public void update(@NonNull WifiP2pDevice device) {
|
||||
updateSupplicantDetails(device);
|
||||
status = device.status;
|
||||
|
||||
Reference in New Issue
Block a user