Skip to content

Add sort by Wi-Fi Standard option to AccessPoints view#604

Open
gioalex07 wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07:feature/sort-by-standard
Open

Add sort by Wi-Fi Standard option to AccessPoints view#604
gioalex07 wants to merge 3 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07:feature/sort-by-standard

Conversation

@gioalex07
Copy link
Copy Markdown

Summary

  • Add STANDARD as a new sort option in the Access Points view.
  • Users can now sort access points by Wi-Fi standard descending (Wi-Fi 7 → Wi-Fi 6 → Wi-Fi 5 → Wi-Fi 4 → Legacy → Unknown).

What does this implement/fix?

The WiFiStandard enum and its detection logic (WiFiStandard.findOne()) were already fully
implemented but not exposed as a sort criteria. This change adds STANDARD to SortBy following
the exact same pattern as the existing STRENGTH, SSID and CHANNEL options.

Sort order for STANDARD:

  • Primary: Wi-Fi standard descending by wiFiStandardId (BE=8 > AX=6 > AD=7 > AC=5 > N=4 > LEGACY=1 > UNKNOWN=0)
  • Secondary: signal strength descending
  • Tertiary: SSID ascending
  • Quaternary: BSSID ascending

Files changed:

  • wifi/model/SortBy.kt — add sortByStandard() comparator and STANDARD enum entry
  • res/values/arrays.xml — add index and label to sort_by_index_array and sort_by_array
  • res/values/strings.xml — add sort_by_standard string resource
  • wifi/model/SortByTest.kt — update size assertion, add ordinal and comparator assertions

Does this close any issues?

  • N/A (new feature)

How was this tested?

  • Platform: WSL2 / AlmaLinux 9
  • Build variant: debug
  • Toolchain: JDK 21 (Zulu), Gradle 9.3.1, Android SDK 36, Kotlin 2.3.0
./gradlew ktlintFormat                                             → BUILD SUCCESSFUL
./gradlew ktlintCheck                                              → BUILD SUCCESSFUL
./gradlew testDebugUnitTest                                        → BUILD SUCCESSFUL (3432 tests)

Checklist (required before marking ready)

  • I added or updated unit tests (see app/src/test/)
  • I followed the project's coding style (ktlint) and formatting
  • I ran lint and addressed or documented any warnings
  • CI checks pass (unit tests, coverage, lint)
  • No sensitive data, keys, or secrets are included

Additional context

On devices running Android 10 or earlier (< Build.VERSION_CODES.R), WiFiStandard returns
UNKNOWN for all access points — this is existing behavior handled by WiFiStandard.findOne().
The sort remains stable in that case since tiebreakers (strength, SSID, BSSID) still apply.

Note: translations for sort_by_standard in non-English locales are not included in this PR
as the string is currently marked translatable="false" consistent with sort_by_ssid in the
existing codebase.

gioalex07 and others added 2 commits April 2, 2026 18:49
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
@VREMSoftwareDevelopment
Copy link
Copy Markdown
Owner

Thanks for the contribution.

  1. AI Usage Disclosure
    Disclose any AI tool involvement and use the “AI assistance used” label.

  2. Testing Requirements
    Changes must be tested on a real Android device.
    Emulator‑only testing or running build tasks (e.g., ktlintCheck, unit tests, successful Gradle build) is not sufficient.
    UI/UX behavior, layouts, gestures, and rendering often differ between emulators and actual devices.

Please update the PR with real‑device testing details so review can continue.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (bd25b4d) to head (f184ee0).
⚠️ Report is 1 commits behind head on main.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VREMSoftwareDevelopment VREMSoftwareDevelopment added the AI assistance used Indicates that an AI assistant was used to generate this PR label Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assistance used Indicates that an AI assistant was used to generate this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants