앱 서랍 컨텍스트 기반 추천 가중치 버그 수정 및 날짜/시간 로그 보완

- WorkersDb.getContextualRecommendations():
  - 오늘 날짜 로그가 매월/매년 보너스(+15점)를 중복으로 받아 시간대/요일 패턴을 압살하던 버그 수정 (25일/330일 이상 경과한 과거 기록에만 월간/연간 반복 가중치 적용)
  - 자정(23시<->0시) 경계 시간대 비교를 원형 거리로 수정하고 평일/주말 그룹 가중치 및 완만한 7일 반감기 감쇠 적용
  - itemType:itemKey 복합 키로 앱/연락처 키 충돌 방지
- WorkersDb.syncSystemUsageStats(): 외부 실행 로그(AppUsageLog) 생성 시 누락되어 있던 month/dayOfMonth/dayOfWeek/hour 필드 정상 기록
- AppDrawerBottomSheet: 차단/미설치 앱 제외 후에도 최대 18개 추천을 채우도록 여유 후보(limit=40) 조회
This commit is contained in:
2026-11-16 14:34:59 +09:00
parent c6622c8e16
commit 6925c80015
2 changed files with 50 additions and 28 deletions
@@ -404,9 +404,10 @@ class AppDrawerBottomSheet : BottomSheetDialogFragment() {
?.takeIf { it.first == isHiddenSelected }
?.second
?: run {
val scoredItems = WorkersDb.getContextualRecommendations(limit = 18)
val scoredItems = WorkersDb.getContextualRecommendations(limit = 40)
val list = mutableListOf<RecommendationItem>()
for (item in scoredItems) {
if (list.size >= 18) break
if (item.type == "APP") {
val app = realm.query<AppInfo>("pkgName == $0", item.key).first().find()
if (app != null && (app.blockRecommend == false || (isHiddenSelected == app.blockRecommend))) {