WifiConfiguration状态之间的差异

时间:2014-04-01 20:05:09

标签: android android-4.0-ice-cream-sandwich android-wifi android-4.2-jelly-bean wificonfiguration

WifiConfiguration.Status = CURRENT和ENABLED有什么区别?我可以找到DISABLED,但CURRENT和ENABLED之间的区别对我来说并不明显。

另外,对于给定的连接网络,4.0.3没有给我保存状态,因为4.0.4和4.2.2给我。前者给了我ENABLED,而后者给了我CURRENT。有人知道为什么吗?

谢谢!

1 个答案:

答案 0 :(得分:1)

来自Status类的Javadoc:

/** this is the network we are currently connected to */
public static final int CURRENT = 0;

/** supplicant will not attempt to use this network */
public static final int DISABLED = 1;

/** supplicant will consider this network available for association */
public static final int ENABLED = 2;

因此,如果4.0.3没有为当前连接的网络返回CURRENT,那么这似乎可能是4.0.4中修复的错误。