Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20ceb4c6 authored by David Su's avatar David Su
Browse files

Expose WifiP2pDevice.update() as public API

Bug: 143892817
Test: compiles
Change-Id: Ibab8b0e1ccd88993978549bd61be21c82e777f41
parent 58bea80f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30564,6 +30564,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();
+1 −2
Original line number Diff line number Diff line
@@ -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));
+3 −5
Original line number Diff line number Diff line
@@ -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;