Public Access
Record the keep-alive corrections in the port notes and the manual checks
The port doc's backgrounding decision now carries the four corrections rather than describing a wiring that was not true, and Phase 14 gains the checks a phone can actually run: a backgrounded shell surviving, an idle Files connection surviving, the permission ask arriving at the first thing worth showing, and a refusal costing the notification and nothing else.
This commit is contained in:
+49
-1
@@ -2075,9 +2075,57 @@ Queue several files in each direction, put the phone to sleep with the screen of
|
||||
notification goes away when the last one does — with no shell open. With a shell open it stays, because that
|
||||
is what it was already for.
|
||||
|
||||
Now, separately: open a shell to the host, press the home button (backgrounding rather than sleeping — the
|
||||
distinction matters, because backgrounded is the state in which Android is free to kill a process no
|
||||
foreground service is protecting), wait thirty seconds with the shell doing nothing, and return.
|
||||
|
||||
**Pass:** the notification stayed up the whole time, and the shell is exactly where it was — same scrollback,
|
||||
same prompt — with typing reaching the host immediately. Exit the shell.
|
||||
|
||||
**Pass:** the notification goes with it, once nothing else is open.
|
||||
|
||||
**Failure means:** an upload that stalls with the screen off is the count not reaching
|
||||
`SessionForegroundService`, and Android has stopped the process mid-transfer. A notification left up
|
||||
afterwards is `ActivityChanged` not being subscribed — the other end of the same wire.
|
||||
afterwards is `ActivityChanged` not being subscribed — the other end of the same wire. A shell that has
|
||||
disconnected on return is `MainWindowViewModel.TerminalSessionOpened` never reaching `SessionKeepAlive` — the
|
||||
service only ever heard about a shell *ending*, so it never came up for one in the first place.
|
||||
|
||||
### 14.6a A Files connection with nothing moving still survives backgrounding
|
||||
|
||||
Connect to a host on the Files screen with no transfer queued — just browse to somewhere and stop. Note the
|
||||
directory shown, then background the app, wait thirty seconds, and return.
|
||||
|
||||
**Pass:** the notification stayed up the whole time (check the shade if the return is too quick to see it
|
||||
directly), and the pane is exactly where it was — the same listing, the same breadcrumb — with no reconnect
|
||||
needed.
|
||||
|
||||
**Failure means:** `TransfersViewModel.HasLiveFileSession` not reaching `SessionKeepAlive`, so an idle but
|
||||
still-open SFTP connection read as nothing running at all and the process was free to die under it.
|
||||
|
||||
### 14.6b The notification permission is asked for once, at the first thing worth showing · **needs Android 13+**
|
||||
|
||||
On a device running Android 13 or later, on a fresh install that has never connected to anything, open a
|
||||
shell or the Files screen for the first time.
|
||||
|
||||
**Pass:** a system dialogue asking to allow notifications appears at that moment — not at launch, and not
|
||||
before this first connect. Answer it either way; the connection completes regardless, and background the app
|
||||
afterwards to confirm nothing else changed about it.
|
||||
|
||||
**Failure means:** the dialogue appearing at launch is asking before there is anything on screen to justify
|
||||
it. Never appearing at all on API 33+ is the harder failure to notice, because nothing else surfaces it —
|
||||
the service still starts and still holds the process open, only the receipt is invisible. See
|
||||
`SessionForegroundService.RequestNotificationPermission`.
|
||||
|
||||
### 14.6c Refusing the permission costs the notification and nothing else
|
||||
|
||||
Continuing from 14.6b: choose **Don't allow** on the system dialogue. Queue a transfer, or open a shell, and
|
||||
background the app.
|
||||
|
||||
**Pass:** no notification appears anywhere, but the transfer still finishes, or the shell is still there on
|
||||
return, exactly as in 14.1–14.6a.
|
||||
|
||||
**Failure means:** anything disconnecting or failing here is the permission refusal being read as though it
|
||||
had refused the service itself, rather than only the notification Android draws for it.
|
||||
|
||||
### 14.7 SAVE FILE writes where you pointed it, and the file opens
|
||||
|
||||
|
||||
Reference in New Issue
Block a user