RunActivity 타이머 크래시 수정 및 서버 URL prod 고정#375
Conversation
- RunActivity: registerReceiver에 RECEIVER_NOT_EXPORTED 플래그 추가 (Android 14+ 필수) - TimerService: sendBroadcast에 setPackage(packageName) 추가하여 앱 내부 전달 보장
- dev/node 서버 미운영 상태로 디버그 모드에서도 prod URL 사용 - 기존 분기 로직은 주석 처리하여 추후 복원 가능
📝 WalkthroughWalkthroughThe pull request consolidates API URL handling by removing dynamic base URL switching logic and hardcoding the production URL, while adding explicit broadcast receiver export flags and package targeting to restrict broadcast delivery scope to the app's own package. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 (1)
app/src/main/java/com/runnect/runnect/application/ApplicationClass.kt (1)
42-58: Consider commenting outinitApiMode()for consistency.The
getBaseUrl()change is correct for the current situation. However,initApiMode()(lines 29-32) is still being called inonCreate()despite having no effect now thatgetBaseUrl()ignoresApiMode. This creates orphaned code that may confuse future maintainers.For consistency with the TODO restoration intent, consider commenting out the
initApiMode()call as well:♻️ Suggested cleanup
KakaoSdk.init(this, getString(R.string.kakao_native_app_key)) - initApiMode() + // TODO: dev/node 서버 복구 시 복원 + // initApiMode() initAnalytics()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@app/src/main/java/com/runnect/runnect/application/ApplicationClass.kt` around lines 42 - 58, The initApiMode() call in onCreate() should be removed or commented out to avoid orphaned initialization since getBaseUrl() now always returns BuildConfig.RUNNECT_PROD_URL; locate the onCreate() method in ApplicationClass and comment out or delete the invocation of initApiMode() (referencing the initApiMode() function and getBaseUrl() method) so the code and the TODO/intent are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@app/src/main/java/com/runnect/runnect/application/ApplicationClass.kt`:
- Around line 42-58: The initApiMode() call in onCreate() should be removed or
commented out to avoid orphaned initialization since getBaseUrl() now always
returns BuildConfig.RUNNECT_PROD_URL; locate the onCreate() method in
ApplicationClass and comment out or delete the invocation of initApiMode()
(referencing the initApiMode() function and getBaseUrl() method) so the code and
the TODO/intent are consistent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a9c41a57-b644-44bc-a5d7-b4bb6c82b51c
📒 Files selected for processing (3)
app/src/main/java/com/runnect/runnect/application/ApplicationClass.ktapp/src/main/java/com/runnect/runnect/presentation/run/RunActivity.ktapp/src/main/java/com/runnect/runnect/presentation/run/TimerService.kt
작업 배경
registerReceiver에RECEIVER_EXPORTED/NOT_EXPORTED플래그 누락으로 SecurityException 크래시 발생변경 사항
RunActivity.ktregisterReceiver에RECEIVER_NOT_EXPORTED플래그 추가TimerService.ktsendBroadcast에setPackage(packageName)추가하여 앱 내부 전달 보장ApplicationClass.ktgetBaseUrl()분기 주석 처리, prod URL 고정 반환영향 범위
Test Plan
🤖 Generated with Claude Code
Summary by CodeRabbit