Differences between WifiConfiguration status

2019-09-01 08:39发布

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条回答
萌系小妹纸
2楼-- · 2019-09-01 09:00

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.

查看更多
登录 后发表回答