fix(phase-1/m2.4b): encrypted imports were a silent no-op on-device
Manual Waydroid pass (phone exports encrypted -> re-imports the same file through the real UI) caught it: the confirm dialog closed but no import ran and no snackbar appeared. PassphraseDialog.onConfirm's shared preamble nulls all URI slots before routing on mode, and the IMPORT branch never re-armed pendingImportUri -- so the preview confirm dialog's Import button read null and skipped viewModel.import entirely. Plain-JSON imports bypass the passphrase dialog, which is why every scripted desktop leg (M2.1-2.5) stayed green. Fix: re-arm pendingImportUri in the IMPORT branch before preview; wrong-pw/dismiss paths still null it and zero the retained chars. Verified on-device after rebuild + `waydroid app install`: export snackbar, magic-sniffed "Decrypt backup" sheet, 4-note preview, and the dedupe snackbar "Imported 0 note(s), skipped 4 already imported." Also lands the Waydroid test rig used for the pass (tools/WAYDROID_ TESTING.md + tools/inject2.c: uinput tap/move/key/text/swipe injector) and the full M2.4b write-up in DESKTOP_FEASIBILITY.md. M2 exit criteria met: bidirectional lossless round-trip plain+encrypted.
This commit is contained in:
1 parent
29288b0370
commit
561d16eb0c
4 files changed
+412
No files matched your search
@@ -410,6 +410,13 @@ fun SettingsScreen(
|
||||
// the app.
|
||||
pendingImportPassphrase = chars.copyOf()
|
||||
if (importUri != null) {
|
||||
// v0.4.2.1 hotfix: re-arm the URI slot that
|
||||
// the shared preamble above just cleared.
|
||||
// The preview-confirm dialog's Import button
|
||||
// reads pendingImportUri; leaving it null
|
||||
// made encrypted imports a silent no-op
|
||||
// (dialog closed, nothing imported).
|
||||
pendingImportUri = importUri
|
||||
scope.launch {
|
||||
// `chars` is consumed (zeroed) by the
|
||||
// decrypt step; the retained copy survives.
|
||||
|
||||
Reference in new issue
Block a user