[helpers] new API for resolve phone number#398
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR adds ChangesPhone number resolution update
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
app/src/main/java/me/capcom/smsgateway/helpers/SubscriptionsHelper.kt (2)
158-158: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer an import over the fully-qualified type reference.
android.telephony.SubscriptionInfois used inline while the rest of the file relies on imports for other Android types.♻️ Suggested tidy-up
+import android.telephony.SubscriptionInfo ... private fun resolvePhoneNumber( subscriptionManager: SubscriptionManager, - info: android.telephony.SubscriptionInfo, + info: SubscriptionInfo, ): String? {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/java/me/capcom/smsgateway/helpers/SubscriptionsHelper.kt` at line 158, The `SubscriptionsHelper` declaration still uses the fully qualified `android.telephony.SubscriptionInfo` inline, unlike the rest of the file. Add an import for `SubscriptionInfo` at the top of the file and update the affected function signature to use the simple type name, keeping consistency with the other imported Android types.
166-166: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider
@Suppress("DEPRECATION")for consistency with the rest of the file.
info.numberis a deprecated property;getSubscriptionsManager(line 14-19) already annotates its own deprecated-API usage with@Suppress("DEPRECATION")for a similar reason.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/java/me/capcom/smsgateway/helpers/SubscriptionsHelper.kt` at line 166, The fallback in the number lookup is using the deprecated `info.number` property without matching the file’s existing deprecated-API handling. Update the logic in `SubscriptionsHelper` around the `info.number?.takeIf { it.isNotBlank() }` access to add `@Suppress("DEPRECATION")` in the same style as `getSubscriptionsManager`, keeping the deprecated usage explicit and consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@app/src/main/java/me/capcom/smsgateway/helpers/SubscriptionsHelper.kt`:
- Line 158: The `SubscriptionsHelper` declaration still uses the fully qualified
`android.telephony.SubscriptionInfo` inline, unlike the rest of the file. Add an
import for `SubscriptionInfo` at the top of the file and update the affected
function signature to use the simple type name, keeping consistency with the
other imported Android types.
- Line 166: The fallback in the number lookup is using the deprecated
`info.number` property without matching the file’s existing deprecated-API
handling. Update the logic in `SubscriptionsHelper` around the
`info.number?.takeIf { it.isNotBlank() }` access to add
`@Suppress("DEPRECATION")` in the same style as `getSubscriptionsManager`,
keeping the deprecated usage explicit and consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b292d47f-7ff6-4f94-b9e7-7f2eb12d746f
📒 Files selected for processing (2)
app/src/main/AndroidManifest.xmlapp/src/main/java/me/capcom/smsgateway/helpers/SubscriptionsHelper.kt
🤖 Pull request artifacts
|
08dc450 to
69a081e
Compare
69a081e to
33de68f
Compare
Summary by CodeRabbit