Skip to content

fix(core): Android 9·10 생체 인증 호환성 복구 (#2200) - #2226

Merged
1hyok merged 2 commits into
developfrom
fix/2200-legacy-biometric-auth
Oct 6, 2026
Merged

1hyok merged 2 commits into
developfrom
fix/2200-legacy-biometric-auth

Conversation

@1hyok

@1hyok 1hyok commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

먼저 BiometricAuth.kt의 API별 허용자 분기, gradle/libs.versions.toml의 호환 버전, 앱의 values/themes.xml과 values-v29/themes.xml을 확인해 주세요.

📌 Issues

Closes #2200

실제 base는 선행 PR #2202의 refactor/2195-core-biometric-prompt입니다. 공통 래퍼를 실제로 소비하는 두 기능에 동일한 수정이 적용됩니다.

📎 변경 내용

Android 9·10에서 지문이 등록되어도 인증을 시작할 수 없었습니다. 공통 래퍼가 지원되지 않는 BIOMETRIC_STRONG | DEVICE_CREDENTIAL 조합을 요청했고, Biometric 1.1.0은 Core 1.19의 비활성화된 FingerprintManagerCompat에 의존해 일반 API29 기기의 지문도 사용 불가로 판정했습니다.

API28·29에서만 BIOMETRIC_STRONG과 시스템 취소 버튼을 사용합니다. API26·27 및 API30 이상은 기존 강한 생체 인증·기기 자격 조합을 유지합니다. API30 이상의 앱 소유 CryptoObject와 반환 cipher의 실제 암호 연산 검증도 유지합니다. 설정의 등록 상태, ViewModel, 이동 배선은 변경하지 않습니다.

API26 기기 검증에서는 AndroidX 지문 대화상자가 기존 플랫폼 테마의 AppCompat 속성 부재로 종료되는 문제도 확인했습니다. 일부 API28 Samsung 기기도 같은 AndroidX 대화상자로 폴백하므로 API26·27·28의 Activity 테마에 AppCompat 호환을 적용하고, API29 이상은 리소스 한정자로 기존 플랫폼 테마를 유지합니다.

Biometric을 내부 fingerprint 호환 구현이 있는 1.4.0-alpha07로 갱신합니다. 현재 안정판 1.1.0에는 이 수정이 없습니다. AndroidX 릴리스 기록과 실제 배포 소스를 대조했습니다. 기존 compileSdk37·AGP9.3.2는 이 버전의 최소 요구사항을 충족합니다. API28·29에서 PIN 폴백을 새로 제공하는 변경은 포함하지 않습니다.

검증

  • 로컬 회귀 195건 통과: 생체 인증 10건, 앱 전체 82건(테마 6건 포함), core/common 47건, Konsist 56건. API26·27·28·29·30·35와 API28 Samsung crypto 폴백을 포함합니다.
  • 실제 AVD 5건 통과: API26 지문·PIN, API28 지문, API29 지문, API30 PIN. API28·29에서는 설정 등록과 애프터노트 관문을 모두 통과했고, 취소·불일치에서는 등록하지 않으며 재시도 후 성공합니다. 실제 OS 프롬프트와 센서/PIN 입력을 사용하고 서버 저장소만 테스트 fixture로 격리했습니다.
  • :app:ktlintCheck, :feature:setting:presentation:ktlintCheck, :core:common:ktlintCheck, git diff --check 통과.
  • 실제 기기 제조사별 전체 조합을 검증한 것은 아닙니다. API28 Samsung 폴백은 Robolectric에서 실제 AndroidX 대화상자 경로를 검증했습니다.

다중 SDK 리소스 테스트를 앱 전체와 함께 실행하면 기본 512MB 테스트 JVM에서 기존 알림 권한 테스트 3건이 리소스 로딩 중 OOM으로 실패했습니다. 같은 82건으로 재현한 뒤 앱 단위 테스트 JVM만 1GB로 설정해 전부 통과했습니다. Gradle 데몬이나 앱 런타임 메모리 설정은 변경하지 않습니다.

자동 회귀 명령:

./gradlew :app:testDebugUnitTest :feature:setting:presentation:testDebugUnitTest --tests 'com.afternote.feature.setting.presentation.passkey.PassKeyMakingApi29Test' :app:ktlintCheck :feature:setting:presentation:ktlintCheck :konsist:test
./gradlew :core:common:testDebugUnitTest :core:common:ktlintCheck

🧪 CI Test Plan

{
  "androidTest": {
    "mode": "full",
    "reason": "Biometric 버전 카탈로그와 앱 테마가 바뀌므로 전체 Android 계측 회귀를 실행한다. 등록된 생체 정보와 센서 입력이 필요한 수동 인증 경로는 별도 로컬 AVD로 검증한다.",
    "tests": []
  }
}

@github-actions
github-actions Bot requested a review from Sadturtleman October 1, 2026 10:04
@github-actions github-actions Bot added the android-test PR head에서 Android Managed Device 계측 테스트 실행 label Oct 1, 2026
@1hyok
1hyok added this pull request to stack #2227 October 1, 2026 10:06
@1hyok
1hyok removed this pull request from stack #2227 October 1, 2026 12:06
@1hyok
1hyok added this pull request to stack #2234 October 1, 2026 12:06

@Sadturtleman Sadturtleman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API 28·29 에서만 BIOMETRIC_STRONG + 취소 버튼으로 분기하고 나머지 버전의 허용자·CryptoObject 정책을 유지하는 것, 그리고 v29 한정자로 테마 영향 범위를 제한한 것을 확인했습니다. 승인합니다.

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

이 PR 은 refactor/2195-core-biometric-prompt 와 충돌 상태이고, 그래서 CI 가 돌지 않는다.

pull_request 워크플로는 base 와 head 를 합친 가상 머지 커밋(refs/pull/<N>/merge)에서
실행되는데, 충돌이면 GitHub 이 그 ref 를 만들지 못해 워크플로가 트리거조차 되지 않는다.
체크가 실패하는 것이 아니라 아예 생성되지 않으므로, 새 커밋을 올려도 no checks reported
인 채 최신 커밋이 한 번도 검증되지 않은 상태로 남는다 (#1028).

refactor/2195-core-biometric-prompt 를 병합해 충돌을 풀면 검증이 다시 돈다. 해소되면 이 라벨은 자동으로 떨어진다.

@github-actions github-actions Bot removed the conflict base 와 충돌 — CI 가 트리거되지 않는다. base 를 병합하면 자동으로 떨어진다 label Oct 6, 2026
Base automatically changed from refactor/2195-core-biometric-prompt to develop October 6, 2026 07:48
@1hyok
1hyok force-pushed the fix/2200-legacy-biometric-auth branch from ff60ecf to 41636a9 Compare October 6, 2026 07:48
@1hyok
1hyok added this pull request to the merge queue Oct 6, 2026
Merged via the queue into develop with commit 04bf1dc Oct 6, 2026
24 checks passed
@1hyok
1hyok deleted the fix/2200-legacy-biometric-auth branch October 6, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android-test PR head에서 Android Managed Device 계측 테스트 실행

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core): Android 9·10 에서 생체 인증 관문을 통과할 수 없다

2 participants