Differences between WifiConfiguration status

吃可爱长大的小学妹 提交于 2019-12-11 19:52:46

问题


What is the difference between WifiConfiguration.Status = CURRENT and ENABLED? I can figure for DISABLED but the difference between CURRENT and ENABLED is not obvious to me.

Also, for a given connected network, 4.0.3 doesn't give me the save status as 4.0.4 and 4.2.2 give me. The former gives me ENABLED while the later give me CURRENT. Someone knows why?

Thanks!


回答1:


From the Javadoc for the Status class:

/** 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;

So if 4.0.3 isn't returning CURRENT for the currently connected network, that seems likely to be a bug that was fixed in 4.0.4.



来源:https://stackoverflow.com/questions/22795829/differences-between-wificonfiguration-status

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!