Add sort by Wi-Fi Standard option to AccessPoints view#604
Open
gioalex07 wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
Open
Add sort by Wi-Fi Standard option to AccessPoints view#604gioalex07 wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07 wants to merge 3 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
Owner
|
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.83%
Complexity 975 975
=========================================
Files 121 121
Lines 2581 2586 +5
Branches 211 211
=========================================
+ Hits 2525 2530 +5
Misses 19 19
Partials 37 37 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.