Add sort by Wi-Fi Standard option to AccessPoints view#604
Add sort by Wi-Fi Standard option to AccessPoints view#604gioalex07 wants to merge 4 commits intoVREMSoftwareDevelopment:mainfrom
Conversation
Add STANDARD as a new SortBy option that orders access points by Wi-Fi standard descending (BE > AX > AC > N > LEGACY > UNKNOWN), with signal strength, SSID and BSSID as tiebreakers. - SortBy.kt: add sortByStandard() comparator and STANDARD enum entry - arrays.xml: add Standard option to sort_by_index_array and sort_by_array - strings.xml: add sort_by_standard string resource - SortByTest.kt: update size, ordinal and comparator assertions
|
Thanks for the contribution.
Please update the PR with real‑device testing details so review can continue. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #604 +/- ##
============================================
- Coverage 97.83% 97.76% -0.07%
- Complexity 975 979 +4
============================================
Files 121 121
Lines 2581 2818 +237
Branches 211 211
============================================
+ Hits 2525 2755 +230
- Misses 19 26 +7
Partials 37 37 🚀 New features to boost your workflow:
|
|
Thank you for the contribution. |
Summary
STANDARDas a new sort option in the Access Points view.What does this implement/fix?
The
WiFiStandardenum and its detection logic (WiFiStandard.findOne()) were already fullyimplemented but not exposed as a sort criteria. This change adds
STANDARDtoSortByfollowingthe exact same pattern as the existing
STRENGTH,SSIDandCHANNELoptions.Sort order for
STANDARD:wiFiStandardId(BE=8 > AX=6 > AD=7 > AC=5 > N=4 > LEGACY=1 > UNKNOWN=0)Files changed:
wifi/model/SortBy.kt— addsortByStandard()comparator andSTANDARDenum entryres/values/arrays.xml— add index and label tosort_by_index_arrayandsort_by_arrayres/values/strings.xml— addsort_by_standardstring resourcewifi/model/SortByTest.kt— update size assertion, add ordinal and comparator assertionsDoes this close any issues?
How was this tested?
Checklist (required before marking ready)
app/src/test/)Additional context
On devices running Android 10 or earlier (
< Build.VERSION_CODES.R),WiFiStandardreturnsUNKNOWNfor all access points — this is existing behavior handled byWiFiStandard.findOne().The sort remains stable in that case since tiebreakers (strength, SSID, BSSID) still apply.
Note: translations for
sort_by_standardin non-English locales are not included in this PRas the string is currently marked
translatable="false"consistent withsort_by_ssidin theexisting codebase.