Loading wifi/java/android/net/wifi/WifiConfiguration.java +26 −0 Original line number Diff line number Diff line Loading @@ -1625,6 +1625,14 @@ public class WifiConfiguration implements Parcelable { */ private boolean mHasEverConnected; /** * Boolean indicating if captive portal has never been detected on this network. * * This should be true by default, for newly created WifiConfigurations until a captive * portal is detected. */ private boolean mHasNeverDetectedCaptivePortal = true; /** * set whether this network is visible in latest Qualified Network Selection * @param seen value set to candidate Loading Loading @@ -1714,6 +1722,19 @@ public class WifiConfiguration implements Parcelable { return mHasEverConnected; } /** * Set whether a captive portal has never been detected on this network. * @hide */ public void setHasNeverDetectedCaptivePortal(boolean value) { mHasNeverDetectedCaptivePortal = value; } /** @hide */ public boolean hasNeverDetectedCaptivePortal() { return mHasNeverDetectedCaptivePortal; } /** @hide */ public NetworkSelectionStatus() { // previously stored configs will not have this parameter, so we default to false. Loading Loading @@ -1989,6 +2010,7 @@ public class WifiConfiguration implements Parcelable { setCandidateScore(source.getCandidateScore()); setConnectChoice(source.getConnectChoice()); setHasEverConnected(source.hasEverConnected()); setHasNeverDetectedCaptivePortal(source.hasNeverDetectedCaptivePortal()); } /** @hide */ Loading @@ -2008,6 +2030,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(CONNECT_CHOICE_NOT_EXISTS); } dest.writeInt(hasEverConnected() ? 1 : 0); dest.writeInt(hasNeverDetectedCaptivePortal() ? 1 : 0); } /** @hide */ Loading @@ -2026,6 +2049,7 @@ public class WifiConfiguration implements Parcelable { setConnectChoice(null); } setHasEverConnected(in.readInt() != 0); setHasNeverDetectedCaptivePortal(in.readInt() != 0); } } Loading Loading @@ -2287,6 +2311,8 @@ public class WifiConfiguration implements Parcelable { } sbuf.append(" hasEverConnected: ") .append(mNetworkSelectionStatus.hasEverConnected()).append("\n"); sbuf.append(" hasNeverDetectedCaptivePortal: ") .append(mNetworkSelectionStatus.hasNeverDetectedCaptivePortal()).append("\n"); if (this.numAssociation > 0) { sbuf.append(" numAssociation ").append(this.numAssociation).append("\n"); Loading Loading
wifi/java/android/net/wifi/WifiConfiguration.java +26 −0 Original line number Diff line number Diff line Loading @@ -1625,6 +1625,14 @@ public class WifiConfiguration implements Parcelable { */ private boolean mHasEverConnected; /** * Boolean indicating if captive portal has never been detected on this network. * * This should be true by default, for newly created WifiConfigurations until a captive * portal is detected. */ private boolean mHasNeverDetectedCaptivePortal = true; /** * set whether this network is visible in latest Qualified Network Selection * @param seen value set to candidate Loading Loading @@ -1714,6 +1722,19 @@ public class WifiConfiguration implements Parcelable { return mHasEverConnected; } /** * Set whether a captive portal has never been detected on this network. * @hide */ public void setHasNeverDetectedCaptivePortal(boolean value) { mHasNeverDetectedCaptivePortal = value; } /** @hide */ public boolean hasNeverDetectedCaptivePortal() { return mHasNeverDetectedCaptivePortal; } /** @hide */ public NetworkSelectionStatus() { // previously stored configs will not have this parameter, so we default to false. Loading Loading @@ -1989,6 +2010,7 @@ public class WifiConfiguration implements Parcelable { setCandidateScore(source.getCandidateScore()); setConnectChoice(source.getConnectChoice()); setHasEverConnected(source.hasEverConnected()); setHasNeverDetectedCaptivePortal(source.hasNeverDetectedCaptivePortal()); } /** @hide */ Loading @@ -2008,6 +2030,7 @@ public class WifiConfiguration implements Parcelable { dest.writeInt(CONNECT_CHOICE_NOT_EXISTS); } dest.writeInt(hasEverConnected() ? 1 : 0); dest.writeInt(hasNeverDetectedCaptivePortal() ? 1 : 0); } /** @hide */ Loading @@ -2026,6 +2049,7 @@ public class WifiConfiguration implements Parcelable { setConnectChoice(null); } setHasEverConnected(in.readInt() != 0); setHasNeverDetectedCaptivePortal(in.readInt() != 0); } } Loading Loading @@ -2287,6 +2311,8 @@ public class WifiConfiguration implements Parcelable { } sbuf.append(" hasEverConnected: ") .append(mNetworkSelectionStatus.hasEverConnected()).append("\n"); sbuf.append(" hasNeverDetectedCaptivePortal: ") .append(mNetworkSelectionStatus.hasNeverDetectedCaptivePortal()).append("\n"); if (this.numAssociation > 0) { sbuf.append(" numAssociation ").append(this.numAssociation).append("\n"); Loading