The Wi-Fi signal strength displayed in the WIFI status bar is inconsistent with that in the wifisetting list.

Source: Internet
Author: User

The Wi-Fi signal strength displayed in the WIFI status bar is inconsistent with that in the wifisetting list.
[DESCRIPTION] the Wi-Fi signal strength displayed in the status bar is inconsistent with that in the wifisetting list (not synchronized)
[ANALYSIS] 1. apk receives RSSI_CHANGED intent and calls the WifiManager. calculateSignalLevel () method to calculate the number of signals.
2. The call points of the WifiSettings interface and the status bar are AccessPoints. java and NetworkController (Gemini ). java, you can see the two places passed to the WifiManager. the level values of calculateSignalLevel () are different. One value is 4 and the other value is 5. Therefore, the number of cells may be inconsistent. 3. When the value is in the WifiSettings list, the signal is refreshed every 6 seconds, defined in WifiSettings. WIFI_RESCAN_INTERVAL_MS
4. The status refresh time is 3 s, which is defined in wifiStatemachine. java (POLL_RSSI_INTERVAL_MSECS). RSSI_CHANGE will be lost if the signal changes.
 
[SOLUTION] 1. Change the levels on both sides to 5 (note that the array should not cross the border)
2. Receive the RSSI_CHANGED message in the wifisetint, and then call updateAccesspoint to synchronously update the interface and status bar. 3. Note that the two sides have the "-69" and "-66" values, to WifiManager. the calculation value of calculateSignalLevel () is different:
31 × 4/45 = 124/45 = 2.xxx
34 × 4/45 = 136/45 = 3. in this case, the level value can be returned according to the range of bsns to reduce the error caused by the conversion from a floating point to an int. For example, if (between-55 and-65, the returned result is 4.
If (the value between-65 and-75 is between-65 and-75), xxx is returned.


[MODIFY :]

Modified according to the MTK solution, and added some changes to the string array: --------------- apps/Settings/res/drawable/wifi_signal_lock.xml --------------- index 2ad6d91 .. f7953d2 100644 @-15, 9 + 15, 12 @ --> <level-list xmlns: android = "http://schemas.android.com/apk/res/android">-<item android: maxLevel = "0" android: drawable = "@ drawable/ic_wifi_lock_signal_1"/>-<item android: maxLevel = "1" android: drawable = "@ drawable/ic_wifi_lock_signal_2"/>-<ite M android: maxLevel = "2" android: drawable = "@ drawable/ic_wifi_lock_signal_3"/>-<item android: maxLevel = "3" android: drawable = "@ drawable/ic_wifi_lock_signal_4"/> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). start --> + <item android: maxLevel = "0" android: drawable = "@ drawable/ic_wifi_lock_signal_0"/> + <item android: maxLevel = "1" android: drawable = "@ drawable/ic_wifi_lock_signal_1"/> + <item android: maxLevel = "2" android: drawable = "@ drawable/ic_wifi_lock_signal_2"/> + <item android: maxLevel = "3" android: drawable = "@ drawable/ic_wifi_lock_signal_3"/> + <item android: maxLeve L = "4" android: drawable = "@ drawable/ic_wifi_lock_signal_4"/> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). end --> </level-list> --------------- apps/Settings/res/drawable/wifi_signal_open.xml --------------- index b506dd3 .. 44dfb9b 100644 @-15, 9 + 15, 12 @ --> <level-list xmlns: android = "http://schemas.android.com/apk/res/android">-<item android: maxLevel = "0" android: drawable = "@ drawable/ic_wifi_signal_1"/>-<item android: maxLevel = "1" android: drawable = "@ drawable /Ic_wifi_signal_2 "/>-<item android: maxLevel =" 2 "android: drawable =" @ drawable/ic_wifi_signal_3 "/>-<item android: maxLevel =" 3 "android: drawable = "@ drawable/ic_wifi_signal_4"/> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). start --> + <item android: maxLevel = "0" android: drawable = "@ drawable/ic_wifi_signal_0"/> + <item android: maxLevel = "1" android: drawable = "@ drawable/ic_wifi_signal_1"/> + <item android: maxLevel = "2" android: drawable = "@ drawable/ic_wifi_signal_2"/> + <item android: maxLevel = "3" android: drawable = "@ drawable/ic_wifi_signal_3"/> + <item android: maxLevel = "4" android: drawa Ble = "@ drawable/ic_wifi_signal_4"/> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). end --> </level-list> ------------------ apps/Settings/res/values-zh-rCN/arrays. xml ------------------ index 4f92ef6 .. 19e6bb8 100644 @-477015974247590543 + 5198271470953124739 @ <item msgid = ""> "1 hour" </item> <item msgid = ""> "Never Time Out" </ item> </string-array> ++ <! -- Modify by BW_APP_zengdakui for bug (39969 ). start --> <string-array name = "wifi_signal"> + <item msgid = "2245412278046491293"> "extremely weak" </item> <item msgid = "2245412278046491293"> "weak" </item> <item msgid = "5615082285463430971"> "general" </item> <item msgid = "3565079809875324621"> "strong" </item> <item msgid =" 5702329417707689835 ">" strong "</item> </string-array> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). end --> <string-array name = "wifi_sleep_policy_entries"> <item msgid = "3269131034472904310"> "always" </item> <item msgid = "844721238536786870"> "only during charging "</item> --------------------- apps/Settings/res/values/arrays. xml --------------------- index bf83879 .. c0a5f08 100644 @-358, 12 + 358, 15 @ <! -- Match this with drawable. wifi_signal. --> <skip/> <! -- Wi-Fi settings. The signal strength a Wi-Fi network has. --> + <! -- Modify by BW_APP_zengdakui for bug (39969 ). start --> <string-array name = "wifi_signal"> + <item> Poorest </item> <item> Poor </item> <item> Fair </item> <item> Good </item> <item> Excellent </item> </string-array> + <! -- Modify by BW_APP_zengdakui for bug (39969). end --> <! -- Wi-Fi settings. presented as a list dialog to the user to choose theWi-Fi sleep policy. --> <string-array name = "wifi_sleep_policy_entries"> --------- apps/Settings/src/com/android/settings/wifi/AccessPoint. java --------- index d30be9d .. 5ca64b0 100644 @-371,13 + 371,16 @ class AccessPoint extends Preference {if (mRssi = Integer. MAX_VALUE) {return-1 ;}++ // modify by BW_APP_zengdakui for bug (39969 ). start/** [Add/Comment] by BW_APP [wangyao] for [39862 wifi signal ctsfailed.] -- start */if (SystemProperties. getBoolean ("ro. bw. show_appswei_wifi ", false) {-return WifiManager. calculateSignalLevelCustom (mRssi, 4); + return WifiManager. calculateSignalLevelCustom (mRssi, 5);} else {-return WifiManager. calculateSignalLevel (mRssi, 4); + return WifiManager. calculateSignalLevel (mRssi, 5);}/** [Add/Comment] by BW_APP [wangyao] for [39862 wifi signal ctsfailed.] -- end */+ // modify by BW_APP_zengdakui for bug (39969 ). end} WifiConfiguration getConfig () {-------- apps/Settings/src/com/android/settings/wifi/WifiSettings. java -------- index c668a1c .. 2813aed 100644 @-1111,6 + 1111,9 @ public class wifiset=extendssettingspreferencefragment} else if (WifiManager. RSSI_CHANGED_ACTION.equals (action) {updateConnectionState (null); + // modify by BW_APP_zengdakui for bug (39969 ). start + updateAccessPoints (); + // modify by BW_APP_zengdakui for bug (39969 ). end} else if (WifiManager. NO_CERTIFICATION_ACTION.equals (action) {// M: show error message @ {String apSSID = ""; ------- apps/Settings/src/com/android/settings/wifi/p2p/WifiP2pPeer. java ------- index d05c9a3 .. eb169ee 100644-39,8 + 39,9 @ public class WifiP2pPeer extends Preference {private int mRssi; private ImageView mSignal; -- private static final int SIGNAL_LEVELS = 4; + // modify by BW_APP_zengdakui for bug (39969 ). start + private static final int SIGNAL_LEVELS = 5; + // modify by BW_APP_zengdakui for bug (39969 ). end public WifiP2pPeer (Context context, WifiP2pDevice dev) {super (context );


The status bar displays a good Wi-Fi signal (the difference is full), but the page cannot be opened.

Ten meters? Check whether the connection is the same hot spot before and after the move.
Different brands of wireless network cards have different modes and different receiving ranges. the quality problem should be ruled out at close distance. Try another channel for hot spots.
 
Why wireless network signals cannot be displayed in the mobile phone wifi Status Bar

No wifi is out of the wifi range.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.