fix: Proper CDMA support with correct SID/NID/BID handling#1029
Open
Huayra-hjy wants to merge 1 commit into
Open
fix: Proper CDMA support with correct SID/NID/BID handling#1029Huayra-hjy wants to merge 1 commit into
Huayra-hjy wants to merge 1 commit into
Conversation
## Changes ### Cell.java - Add isCdma() method to detect CDMA network types (1xRTT, EVDO, eHRPD) - Add getSid() method for CDMA System ID access - Fix toString() to show CDMA-specific labels (BID/NID/SID) vs GSM (CID/LAC/PSC) ### Device.java - Fix BUG: MNC was incorrectly set to SID (System ID) - MCC/MNC should come from ro.cdma.home.operator.numeric, not CdmaCellLocation - Add clarifying comments for CDMA parameters ### DeviceApi18.java - Fix BUG: Remove incorrect MNC=SID assignment in CellInfoCdma handling - Add comments explaining CDMA uses BID/NID/SID ### CellTracker.java - Fix BUG: Remove incorrect MNC=SID assignment in 2 places - Fix comments: BSID -> BID (Base Station ID) - Add note that MCC/MNC comes from Device.refreshDeviceInfo() ### CardItemData.java - Show CDMA-specific labels: BID instead of CID, NID instead of LAC - Show SID instead of PSC for CDMA cells ## CDMA vs GSM Parameter Mapping | GSM | CDMA | Description | |-----|------|-------------| | CID | BID | Cell/Base Station ID | | LAC | NID | Location/Network Area | | PSC | SID | Primary Scrambling/System ID | | MCC | MCC | Mobile Country Code (same) | | MNC | MNC | Mobile Network Code (same) | Fixes CellularPrivacy#489
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
Fix CDMA support by correcting parameter handling and adding proper CDMA/GSM differentiation.
Changes
Cell.java
isCdma()method to detect CDMA network types (1xRTT, EVDO, eHRPD)getSid()method for CDMA System ID accesstoString()to show CDMA-specific labels (BID/NID/SID) vs GSM (CID/LAC/PSC)Device.java
ro.cdma.home.operator.numeric, notCdmaCellLocationDeviceApi18.java
CellInfoCdmahandlingCellTracker.java
CardItemData.java
CDMA vs GSM Parameter Mapping
Testing
This fix corrects the MNC field which was being overwritten with SID on CDMA devices. The MCC/MNC values now correctly come from the system property
ro.cdma.home.operator.numeric.Fixes #489