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

Commit 9ec3b95d authored by David Su's avatar David Su Committed by Android (Google) Code Review
Browse files

Merge "Expose getters for WifiP2pConfig fields"

parents 60cadb23 8f24cd9d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -30648,6 +30648,10 @@ package android.net.wifi.p2p {
    ctor public WifiP2pConfig();
    ctor public WifiP2pConfig(android.net.wifi.p2p.WifiP2pConfig);
    method public int describeContents();
    method public int getGroupOwnerBand();
    method public int getNetworkId();
    method @Nullable public String getNetworkName();
    method @Nullable public String getPassphrase();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pConfig> CREATOR;
    field public static final int GROUP_OWNER_BAND_2GHZ = 1; // 0x1
@@ -30721,6 +30725,8 @@ package android.net.wifi.p2p {
    method public boolean isGroupOwner();
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pGroup> CREATOR;
    field public static final int PERSISTENT_NET_ID = -2; // 0xfffffffe
    field public static final int TEMPORARY_NET_ID = -1; // 0xffffffff
  }
  public class WifiP2pInfo implements android.os.Parcelable {
+26 −9
Original line number Diff line number Diff line
@@ -48,21 +48,29 @@ public class WifiP2pConfig implements Parcelable {
     */
    public WpsInfo wps;

    /**
     * The network name of a group, should be configured by helper method
     */
    /** Get the network name of this P2P configuration, or null if unset. */
    @Nullable
    public String getNetworkName() {
        return networkName;
    }

    /** @hide */
    public String networkName = "";

    /**
     * The passphrase of a group, should be configured by helper method
     */
    /** Get the passphrase of this P2P configuration, or null if unset. */
    @Nullable
    public String getPassphrase() {
        return passphrase;
    }

    /** @hide */
    public String passphrase = "";

    /**
     * The required band for Group Owner
     */
    /** Get the required band for the group owner. */
    public int getGroupOwnerBand() {
        return groupOwnerBand;
    }

    /** @hide */
    public int groupOwnerBand = GROUP_OWNER_BAND_AUTO;

@@ -123,6 +131,15 @@ public class WifiP2pConfig implements Parcelable {
    @UnsupportedAppUsage
    public int netId = WifiP2pGroup.PERSISTENT_NET_ID;

    /**
     * Get the network ID of this P2P configuration.
     * @return either a non-negative network ID, or one of {@link WifiP2pGroup#PERSISTENT_NET_ID} or
     * {@link WifiP2pGroup#TEMPORARY_NET_ID}.
     */
    public int getNetworkId() {
        return netId;
    }

    public WifiP2pConfig() {
        //set defaults
        wps = new WpsInfo();
+2 −5
Original line number Diff line number Diff line
@@ -39,18 +39,15 @@ public class WifiP2pGroup implements Parcelable {

    /**
     * The temporary network id.
     *
     * @hide
     * @see #getNetworkId()
     */
    @UnsupportedAppUsage
    public static final int TEMPORARY_NET_ID = -1;

    /**
     * The persistent network id.
     * If a matching persistent profile is found, use it.
     * Otherwise, create a new persistent profile.
     *
     * @hide
     * @see #getNetworkId()
     */
    public static final int PERSISTENT_NET_ID = -2;