- Fix the QR pairing crash by removing
viewLifecycleOwnerusage from asynchronous Firestore success callbacks inHomeFragment. - Lock down the PIN entry screen so Android Back / remote Back cannot bypass a locked profile.
- Validate with
./gradlew.bat :app:assemblePrereleaseDebug.
- In
HomeFragment, replaceviewLifecycleOwner.lifecycleScope.launchinside pairing callbacks with fragment-safe lifecycle handling that does not callgetView()afteronDestroyView(). - Add lifecycle guards before showing pairing completion/failure toasts.
- In
PinEntryDialog, make the locked-profile PIN dialog non-cancelable and intercept Android Back / remote Back. - Disable the visible PIN cancel action so only a correct PIN can invoke
onPinVerified.
- Scan QR and navigate away immediately after scan; the app must not crash or enter safe mode.
- Complete QR pairing successfully; phone waits for TV completion, then shows success.
- Complete manual pairing successfully.
- Press Android Back, gesture Back, and TV remote Back on the locked-profile PIN screen; the PIN screen must remain open.
- Enter a wrong PIN; the dialog stays open and clears the digits.
- Enter the correct PIN; the profile unlocks and selects.
- Run
./gradlew.bat :app:assemblePrereleaseDebug.
- Back blocking applies only to the locked-profile PIN authentication screen.
- No Firestore schema, navigation graph, or public API changes are needed.