Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
frameworks_opt_net_wifi
Commits
8ccabb81
Commit
8ccabb81
authored
10 years ago
by
vandwalle
Browse files
Options
Download
Email Patches
Plain Diff
handle beacons reported with wrong RSSI value of 0
Bug:18654243 Change-Id: Ied2fbc87c7effc23fecb68e9863153d63c0cfba4
parent
93a1fdde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
service/java/com/android/server/wifi/WifiAutoJoinController.java
.../java/com/android/server/wifi/WifiAutoJoinController.java
+12
-0
service/java/com/android/server/wifi/WifiConfigStore.java
service/java/com/android/server/wifi/WifiConfigStore.java
+5
-0
No files found.
service/java/com/android/server/wifi/WifiAutoJoinController.java
View file @
8ccabb81
...
...
@@ -171,11 +171,23 @@ public class WifiAutoJoinController {
// Fetch the previous instance for this result
ScanResult
sr
=
scanResultCache
.
get
(
result
.
BSSID
);
if
(
sr
!=
null
)
{
if
(
mWifiConfigStore
.
scanResultRssiLevelPatchUp
!=
0
&&
result
.
level
==
0
&&
sr
.
level
<
-
20
)
{
// A 'zero' RSSI reading is most likely a chip problem which returns
// an unknown RSSI, hence ignore it
result
.
level
=
sr
.
level
;
}
// If there was a previous cache result for this BSSID, average the RSSI values
result
.
averageRssi
(
sr
.
level
,
sr
.
seen
,
mScanResultMaximumAge
);
// Remove the previous Scan Result - this is not necessary
scanResultCache
.
remove
(
result
.
BSSID
);
}
else
if
(
mWifiConfigStore
.
scanResultRssiLevelPatchUp
!=
0
&&
result
.
level
==
0
)
{
// A 'zero' RSSI reading is most likely a chip problem which returns
// an unknown RSSI, hence initialize it to a sane value
result
.
level
=
mWifiConfigStore
.
scanResultRssiLevelPatchUp
;
}
if
(!
mNetworkScoreCache
.
isScoredNetwork
(
result
))
{
...
...
This diff is collapsed.
Click to expand it.
service/java/com/android/server/wifi/WifiConfigStore.java
View file @
8ccabb81
...
...
@@ -387,6 +387,7 @@ public class WifiConfigStore extends IpConfigStore {
public
boolean
enableWifiCellularHandoverUserTriggeredAdjustment
=
true
;
public
int
currentNetworkBoost
=
25
;
public
int
scanResultRssiLevelPatchUp
=
-
85
;
/**
* Regex pattern for extracting a connect choice.
...
...
@@ -539,8 +540,12 @@ public class WifiConfigStore extends IpConfigStore {
enableAutoJoinWhenAssociated
=
mContext
.
getResources
().
getBoolean
(
R
.
bool
.
config_wifi_framework_enable_associated_network_selection
);
currentNetworkBoost
=
mContext
.
getResources
().
getInteger
(
R
.
integer
.
config_wifi_framework_current_network_boost
);
scanResultRssiLevelPatchUp
=
mContext
.
getResources
().
getInteger
(
R
.
integer
.
config_wifi_framework_scan_result_rssi_level_patchup_value
);
}
void
enableVerboseLogging
(
int
verbose
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment