FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(android): null-safe getAvailableSimSlots when no active SIM by wized2 · Pull Request #355 · textbee/textbee · GitHub

fix(android): null-safe getAvailableSimSlots when no active SIM - #355

Open
wized2 wants to merge 1 commit into
textbee:mainfrom
wized2:fix/sim-null-safe-active-subscriptions
Open

wized2 wants to merge 1 commit into
textbee:mainfrom
wized2:fix/sim-null-safe-active-subscriptions

Conversation

wized2 commented Sep 20, 2026
edited by coderabbitai Bot
Loading

Copy link
Copy Markdown

Fixes #257

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling when no active SIM cards are available.
    • Prevented potential errors while retrieving SIM slot and subscription information.

getActiveSubscriptionInfoList() returns null with no SIMs; callers
expect a list and could surface Error: null.

Fixes textbee#257

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

@wized2 is attempting to deploy a commit to the Nuver Labs Team on Vercel.

A member of the Team first needs to authorize it.

coderabbitai Bot commented Sep 20, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info ⚙️ Run configuration

Configuration used: Repository: textbee/textbee/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2ebda84a-e552-45a4-a7e7-174faeba4b17

📥 Commits

Reviewing files that changed from the base of the PR and between 0d09464 and 2edd86a.

📒 Files selected for processing (1)
  • android/app/src/main/java/com/vernu/sms/TextbeeUtils.java

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

TextbeeUtils now handles null results from SubscriptionManager.getActiveSubscriptionInfoList() by using empty lists in three methods.

Changes

SIM subscription handling

Layer / File(s) Summary
Null-safe subscription list handling
android/app/src/main/java/com/vernu/sms/TextbeeUtils.java
getAvailableSimSlots, collectSimInfo, and isValidSubscriptionId now substitute empty lists when no active subscriptions exist. Existing later null checks in the latter two methods are unreachable after this change.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: vernu

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making Android getAvailableSimSlots null-safe when no active SIM is present.
Linked Issues check ✅ Passed Issue #257 requires TextbeeUtils.getAvailableSimSlots() to handle a null result from getActiveSubscriptionInfoList() and return an empty list. The reviewed head assigns the result to list and re…
Out of Scope Changes check ✅ Passed The change is limited to TextbeeUtils.java. The additional null handling in collectSimInfo and isValidSubscriptionId addresses the same getActiveSubscriptionInfoList() behavior described by is…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1 🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

Warning

⚠️ This pull request shows signs of AI-generated slop (defensive_cruft). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: "Error: null" shown when the device has no active SIM

1 participant


Back | FazBrowse Home | New Git URL