-
Notifications
You must be signed in to change notification settings - Fork 1
[REFACTOR] AlarmManager.setAlarmClock 사용하기 #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REFACTOR] AlarmManager.setAlarmClock 사용하기 #265
Conversation
Walkthrough
Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Scheduler as AndroidAlarmScheduler
participant AM as AlarmManager
participant Receiver as AlarmBroadcastReceiver
participant Main as com.yapp.orbit.MainActivity
Note over Scheduler,AM fill:#f0f4ff,stroke:#c7ddff: 변경된 흐름 (setAlarmClock)
Scheduler->>AM: setAlarmClock(AlarmClockInfo(triggerMillis, showMainPI), alarmPI)
AM-->>Scheduler: alarm registered
Note right of AM: 시스템은 showMainPI를 알람 아이콘/시계용으로 사용하고\nalarmPI로 Receiver를 트리거함
AM->>Receiver: send alarmPI at triggerMillis
Receiver-->>Main: optionally launch MainActivity (via showMainPI) / handle alarm logic
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 검토 시 주의사항:
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (2)
core/alarm/src/main/java/com/yapp/alarm/AndroidAlarmScheduler.kt (2)
58-64: 동일한showIntent사용 패턴이 적용되었습니다.이 메서드도
setRepeatingAlarm과 동일하게 알람 트리거PendingIntent를showIntent로 사용하고 있습니다. 앞서 언급한 우려사항이 여기에도 적용됩니다.
71-77: 동일한showIntent사용 패턴이 적용되었습니다.이 메서드도 앞의 두 메서드와 동일한 패턴을 사용합니다. 세 메서드 모두 일관되게 리팩토링되었습니다.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
core/alarm/src/main/java/com/yapp/alarm/AndroidAlarmScheduler.kt(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (1)
core/alarm/src/main/java/com/yapp/alarm/AndroidAlarmScheduler.kt (1)
45-77:setAlarmClock()사용의 의도를 확인하세요.권한 요구사항은 만족됩니다—
SCHEDULE_EXACT_ALARM권한이 AndroidManifest.xml에 이미 선언되어 있습니다.다만
setAlarmClock()의 사용으로 인한 UX 변경을 확인해주세요: 알람이 상태 표시줄에 아이콘으로 표시되고 시스템의 다음 알람 목록에 노출됩니다. 이는setExactAndAllowWhileIdle()의 동작과 다르며, 의도된 설계 변경인지 확인이 필요합니다.
Codecov Report❌ Patch coverage is
❌ Your project status has failed because the head coverage (6.54%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #265 +/- ##
============================================
+ Coverage 6.10% 6.54% +0.43%
Complexity 67 67
============================================
Files 53 53
Lines 4864 4387 -477
Branches 712 637 -75
============================================
- Hits 297 287 -10
+ Misses 4539 4072 -467
Partials 28 28
🚀 New features to boost your workflow:
|
Related issue 🛠
closed #264
어떤 변경사항이 있었나요?
CheckPoint ✅
PR이 다음 요구 사항을 충족하는지 확인하세요.
Work Description ✏️
adcdf.mov
setExactAndAllowIdle()를setAlarmClock()으로 대체Uncompleted Tasks 😅
N/A
To Reviewers 📢
setExactAndAllowIdle을 써도 알람이 제 시각에 안와요
안드로이드 공식 문서 - 정확한 알람을 설정하는 방법
Summary by CodeRabbit