Repository navigation
refactor(core): 생체 인증 프롬프트 래퍼를 core:common 으로 올린다 (#2195) - #2202
Merged
Merged
Conversation
afternote 의 authenticateBiometric·BiometricAuthResult·BiometricMessages 를 동작 그대로 core:common biometric 패키지로 옮기고, 설정 패스키의 private authenticate 사본을 지워 core 래퍼를 부르게 했다. 설정 쪽 하드코딩 문구는 값 그대로 setting_biometric_* 리소스로 옮기고, 나머지 문구는 afternote 와 같은 문장으로 두었다. 설정 패스키는 이로써 canAuthenticate 사전 분기와 초기화 예외 처리를 얻어, 지원하지 않는 조합에서 크래시 대신 오류로 끝난다.
OnlyReadOneBook
added this pull request to stack #2227
October 1, 2026 10:06
…/2195-core-biometric-prompt
Contributor
|
형제 충돌이 해소됐다 — 지금은 이 PR 과 같은 파일을 서로 다르게 고친 열린 PR 이 없다 (#1750). |
OnlyReadOneBook
removed this pull request from stack #2227
October 1, 2026 12:06
OnlyReadOneBook
changed the base branch from
develop
to
fix/708-setting-error-retry
October 1, 2026 12:06
OnlyReadOneBook
added this pull request to stack #2234
October 1, 2026 12:06
This was referenced Oct 1, 2026
Sadturtleman
approved these changes
Oct 4, 2026
Sadturtleman
left a comment
Collaborator
There was a problem hiding this comment.
core:common 으로의 이동과 설정 패스키 등록의 래퍼 교체가 기존 동작을 유지하면서 Android 9·10 크래시 방어를 얻는 것을 확인했습니다. 승인합니다.
…-biometric-prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
먼저 볼 파일:
core/common/.../biometric/BiometricAuth.kt,feature/setting/.../passkey/PassKeyMakingScreen.kt,feature/setting/presentation/src/main/res/values/strings.xml,feature/setting/.../passkey/PassKeyMakingApi29Test.kt입니다.Closes #2195
무엇을
shared/fingerprint/BiometricAuth.kt의FragmentActivity.authenticateBiometric,BiometricAuthResult,BiometricMessages를 core:commonbiometric패키지(BiometricCryptoGate.kt옆)로 옮겼다. 바뀐 것은 패키지,public명시, 같은 패키지가 되어 필요 없어진 import, 로그 태그(FingerprintLogin→BiometricAuth)뿐이다.authenticate·BiometricResult사본을 지우고 core 래퍼를 부른다. 하드코딩돼 있던 제목·부제·검증 실패 문구는 값을 그대로setting_biometric_*리소스로 옮겼고, 래퍼가 요구하는 나머지 문구는 afternote 와 같은 문장으로 두었다.동작 변화
afternote 는 바뀌지 않는다. 설정 패스키 등록만 afternote 가 이미 갖고 있던 방어를 얻는다.
canAuthenticate로 하드웨어 없음·미등록·일시 불가를 가려 오류 팝업으로 끝낸다.authenticate()초기화 예외를 잡아 오류로 끝낸다. 지금은 Android 9·10 에서BIOMETRIC_STRONG | DEVICE_CREDENTIAL조합이PromptInfo.build()에서 예외를 던져 앱이 죽는다.왜
#1166 본문이 이미 복제라고 적은 사본이고, 같은 CodeQL 수정이 afternote(914a440)와 설정(21df4d8)에 18일 간격으로 두 번 들어갔다. 그사이 설정 쪽만 방어가 빠져 위 크래시가 생겼다.
범위 밖
Android 9·10 에서 afternote 관문도 통과할 수 없는 문제(허용자 조합 자체)는 #2200 이 다룬다.
검증
:konsist:test56건, SDK 29 회귀 3건, setting presentationktlintCheck를 다시 통과했다.ktlintCheck통과: 실제 AndroidX의 미지원 허용자 조합 예외, core 래퍼의 오류 반환, 활성화된 지문 인증 버튼의 오류 팝업·닫기·재시도를 확인했다. 오류·닫기·재시도 후에도 패스키 미등록 상태가 유지되고 성공 팝업·화면 이동이 발생하지 않는다. ViewModel은 실제 Hilt Activity 그래프에서 생성하고, 저장 상태는 공개UserProfileCacheRepository계약으로 재조회한다. 테스트에서 Pixel 4 모델과 인증 가능한 프레임워크 상태를 구성했으며, AndroidX와 프로덕션 래퍼 반환값은 mock하지 않았다.:core:common:testDebugUnitTest(47),:feature:afternote:presentation:testDebugUnitTest(333),:feature:setting:presentation:testDebugUnitTest(101), 세 모듈 ktlintCheck,:app:compileDebugUnitTestKotlin,:konsist:test --rerun-tasks(56) 통과passKeyMakingScreenScreenshot·Compact,fingerprintLoginScreenCompactScreenshot통과. 로컬 validateDebugScreenshotTest 의 나머지 실패는 이 변경이 건드리지 않은 화면들이라 CI 결과로 판정한다.CI Test Plan
{"androidTest": {"mode": "none", "reason": "생체 인증 래퍼의 모듈 이동과 두 소비처의 호출 교체다. 화면 레이아웃·네비게이션·계측 테스트 파일은 바뀌지 않았고, 래퍼 판정은 기존 core:common 유닛 테스트와 SDK 29 Robolectric 회귀 3건이 검증한다. 레이아웃은 기존 스크린샷 검증 범위다."}}