Loading wifi/java/android/net/wifi/WifiConfiguration.java +56 −1 Original line number Original line Diff line number Diff line Loading @@ -322,6 +322,24 @@ public class WifiConfiguration implements Parcelable { */ */ public String lastFailure; public String lastFailure; /** * @hide * Uid of app creating the configuration */ public int creatorUid; /** * @hide * Uid of last app issuing a connection related command */ public int lastConnectUid; /** * @hide * Uid of last app modifying the configuration */ public int lastUpdateUid; /** /** * @hide * @hide * BSSID list on which this configuration was seen. * BSSID list on which this configuration was seen. Loading Loading @@ -441,10 +459,17 @@ public class WifiConfiguration implements Parcelable { /** @hide /** @hide * if this is set, the WifiConfiguration cannot use linkages so as to bump * if this is set, the WifiConfiguration cannot use linkages so as to bump * it's relative priority. * it's relative priority. * - status between and 128 indicate various level of blacklisting depending * on the severity or frequency of the connection error * - deleted status indicates that the user is deleting the configuration, and so * although it may have been self added we will not re-self-add it, ignore it, * not return it to applications, and not connect to it * */ * */ public static final int AUTO_JOIN_TEMPORARY_DISABLED = 1; public static final int AUTO_JOIN_TEMPORARY_DISABLED = 1; /** @hide */ /** @hide */ public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE = 2; public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE = 128; /** @hide */ public static final int AUTO_JOIN_DELETED = 200; /** /** * @hide * @hide Loading @@ -453,10 +478,22 @@ public class WifiConfiguration implements Parcelable { /** /** * Set if the configuration was self added by the framework * Set if the configuration was self added by the framework * This boolean is cleared if we get a connect/save/ update or * any wifiManager command that indicate the user interacted with the configuration * since we will now consider that the configuration belong to him. * @hide * @hide */ */ public boolean selfAdded; public boolean selfAdded; /** * Set if the configuration was self added by the framework * This boolean is set once and never cleared. It is used * so as we never loose track of who created the * configuration in the first place. * @hide */ public boolean didSelfAdd; /** /** * @hide * @hide * Indicate that a WifiConfiguration is temporary and should not be saved * Indicate that a WifiConfiguration is temporary and should not be saved Loading Loading @@ -513,6 +550,7 @@ public class WifiConfiguration implements Parcelable { enterpriseConfig = new WifiEnterpriseConfig(); enterpriseConfig = new WifiEnterpriseConfig(); autoJoinStatus = AUTO_JOIN_ENABLED; autoJoinStatus = AUTO_JOIN_ENABLED; selfAdded = false; selfAdded = false; didSelfAdd = false; ephemeral = false; ephemeral = false; mIpConfiguration = new IpConfiguration(); mIpConfiguration = new IpConfiguration(); } } Loading Loading @@ -650,6 +688,10 @@ public class WifiConfiguration implements Parcelable { sbuf.append(mIpConfiguration.toString()); sbuf.append(mIpConfiguration.toString()); if (selfAdded) sbuf.append("selfAdded"); if (creatorUid != 0) sbuf.append("uid=" + Integer.toString(creatorUid)); return sbuf.toString(); return sbuf.toString(); } } Loading Loading @@ -883,6 +925,7 @@ public class WifiConfiguration implements Parcelable { networkId = source.networkId; networkId = source.networkId; status = source.status; status = source.status; disableReason = source.disableReason; disableReason = source.disableReason; disableReason = source.disableReason; SSID = source.SSID; SSID = source.SSID; BSSID = source.BSSID; BSSID = source.BSSID; FQDN = source.FQDN; FQDN = source.FQDN; Loading Loading @@ -933,6 +976,10 @@ public class WifiConfiguration implements Parcelable { } } lastFailure = source.lastFailure; lastFailure = source.lastFailure; didSelfAdd = source.didSelfAdd; lastConnectUid = source.lastConnectUid; lastUpdateUid = source.lastUpdateUid; creatorUid = source.creatorUid; } } } } Loading Loading @@ -972,6 +1019,10 @@ public class WifiConfiguration implements Parcelable { dest.writeString(defaultGwMacAddress); dest.writeString(defaultGwMacAddress); dest.writeInt(autoJoinStatus); dest.writeInt(autoJoinStatus); dest.writeInt(selfAdded ? 1 : 0); dest.writeInt(selfAdded ? 1 : 0); dest.writeInt(didSelfAdd ? 1 : 0); dest.writeInt(creatorUid); dest.writeInt(lastConnectUid); dest.writeInt(lastUpdateUid); /* /* TODO: should we write the cache results to the parcel? TODO: should we write the cache results to the parcel? if (scanResultCache != null) { if (scanResultCache != null) { Loading Loading @@ -1017,6 +1068,10 @@ public class WifiConfiguration implements Parcelable { config.defaultGwMacAddress = in.readString(); config.defaultGwMacAddress = in.readString(); config.autoJoinStatus = in.readInt(); config.autoJoinStatus = in.readInt(); config.selfAdded = in.readInt() != 0; config.selfAdded = in.readInt() != 0; config.didSelfAdd = in.readInt() != 0; config.creatorUid = in.readInt(); config.lastConnectUid = in.readInt(); config.lastUpdateUid = in.readInt(); /* /* TODO: should we write the cache results to the parcel? TODO: should we write the cache results to the parcel? boolean done = false; boolean done = false; Loading Loading
wifi/java/android/net/wifi/WifiConfiguration.java +56 −1 Original line number Original line Diff line number Diff line Loading @@ -322,6 +322,24 @@ public class WifiConfiguration implements Parcelable { */ */ public String lastFailure; public String lastFailure; /** * @hide * Uid of app creating the configuration */ public int creatorUid; /** * @hide * Uid of last app issuing a connection related command */ public int lastConnectUid; /** * @hide * Uid of last app modifying the configuration */ public int lastUpdateUid; /** /** * @hide * @hide * BSSID list on which this configuration was seen. * BSSID list on which this configuration was seen. Loading Loading @@ -441,10 +459,17 @@ public class WifiConfiguration implements Parcelable { /** @hide /** @hide * if this is set, the WifiConfiguration cannot use linkages so as to bump * if this is set, the WifiConfiguration cannot use linkages so as to bump * it's relative priority. * it's relative priority. * - status between and 128 indicate various level of blacklisting depending * on the severity or frequency of the connection error * - deleted status indicates that the user is deleting the configuration, and so * although it may have been self added we will not re-self-add it, ignore it, * not return it to applications, and not connect to it * */ * */ public static final int AUTO_JOIN_TEMPORARY_DISABLED = 1; public static final int AUTO_JOIN_TEMPORARY_DISABLED = 1; /** @hide */ /** @hide */ public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE = 2; public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE = 128; /** @hide */ public static final int AUTO_JOIN_DELETED = 200; /** /** * @hide * @hide Loading @@ -453,10 +478,22 @@ public class WifiConfiguration implements Parcelable { /** /** * Set if the configuration was self added by the framework * Set if the configuration was self added by the framework * This boolean is cleared if we get a connect/save/ update or * any wifiManager command that indicate the user interacted with the configuration * since we will now consider that the configuration belong to him. * @hide * @hide */ */ public boolean selfAdded; public boolean selfAdded; /** * Set if the configuration was self added by the framework * This boolean is set once and never cleared. It is used * so as we never loose track of who created the * configuration in the first place. * @hide */ public boolean didSelfAdd; /** /** * @hide * @hide * Indicate that a WifiConfiguration is temporary and should not be saved * Indicate that a WifiConfiguration is temporary and should not be saved Loading Loading @@ -513,6 +550,7 @@ public class WifiConfiguration implements Parcelable { enterpriseConfig = new WifiEnterpriseConfig(); enterpriseConfig = new WifiEnterpriseConfig(); autoJoinStatus = AUTO_JOIN_ENABLED; autoJoinStatus = AUTO_JOIN_ENABLED; selfAdded = false; selfAdded = false; didSelfAdd = false; ephemeral = false; ephemeral = false; mIpConfiguration = new IpConfiguration(); mIpConfiguration = new IpConfiguration(); } } Loading Loading @@ -650,6 +688,10 @@ public class WifiConfiguration implements Parcelable { sbuf.append(mIpConfiguration.toString()); sbuf.append(mIpConfiguration.toString()); if (selfAdded) sbuf.append("selfAdded"); if (creatorUid != 0) sbuf.append("uid=" + Integer.toString(creatorUid)); return sbuf.toString(); return sbuf.toString(); } } Loading Loading @@ -883,6 +925,7 @@ public class WifiConfiguration implements Parcelable { networkId = source.networkId; networkId = source.networkId; status = source.status; status = source.status; disableReason = source.disableReason; disableReason = source.disableReason; disableReason = source.disableReason; SSID = source.SSID; SSID = source.SSID; BSSID = source.BSSID; BSSID = source.BSSID; FQDN = source.FQDN; FQDN = source.FQDN; Loading Loading @@ -933,6 +976,10 @@ public class WifiConfiguration implements Parcelable { } } lastFailure = source.lastFailure; lastFailure = source.lastFailure; didSelfAdd = source.didSelfAdd; lastConnectUid = source.lastConnectUid; lastUpdateUid = source.lastUpdateUid; creatorUid = source.creatorUid; } } } } Loading Loading @@ -972,6 +1019,10 @@ public class WifiConfiguration implements Parcelable { dest.writeString(defaultGwMacAddress); dest.writeString(defaultGwMacAddress); dest.writeInt(autoJoinStatus); dest.writeInt(autoJoinStatus); dest.writeInt(selfAdded ? 1 : 0); dest.writeInt(selfAdded ? 1 : 0); dest.writeInt(didSelfAdd ? 1 : 0); dest.writeInt(creatorUid); dest.writeInt(lastConnectUid); dest.writeInt(lastUpdateUid); /* /* TODO: should we write the cache results to the parcel? TODO: should we write the cache results to the parcel? if (scanResultCache != null) { if (scanResultCache != null) { Loading Loading @@ -1017,6 +1068,10 @@ public class WifiConfiguration implements Parcelable { config.defaultGwMacAddress = in.readString(); config.defaultGwMacAddress = in.readString(); config.autoJoinStatus = in.readInt(); config.autoJoinStatus = in.readInt(); config.selfAdded = in.readInt() != 0; config.selfAdded = in.readInt() != 0; config.didSelfAdd = in.readInt() != 0; config.creatorUid = in.readInt(); config.lastConnectUid = in.readInt(); config.lastUpdateUid = in.readInt(); /* /* TODO: should we write the cache results to the parcel? TODO: should we write the cache results to the parcel? boolean done = false; boolean done = false; Loading