Compare commits

..

3 Commits

Author SHA1 Message Date
SoftwareApp ddcd68b4b7 Make Copy to… and Cut to… the selection bar's actions
verify / gate (push) Has been cancelled
verify / release (push) Has been cancelled
The selection bar offered Copy and Move, which only filled an in-app clipboard; the
destination picker then lived behind an overflow menu, and Paste in the top bar. That
made a copy a two-step detour through another folder - the thing M16's picker exists to
avoid.

- The bar's two verbs are now Copy to… and Cut to…, both opening the destination picker.
- The clipboard state, Paste here, and the overflow's duplicate Copy to… / Move to… are
  removed. The picker's cut title and confirm are Cut to… / Cut here.
- A copy still keeps the selection for a second destination; a cut clears it. Conflicts
  still ask before overwriting, naming the picked folder.
- Five clipboard tests are removed; the mark, restart and undo tests now use the picker.
  BrowserTopBar's search and overflow sections are extracted so its two new detekt
  findings are fixed rather than baselined.

Driven on the Xiaomi phone: Copy to… copied 120 x 16 MB through Internal storage ->
AADemo -> Target and reported Copied 121 items to Target; Cut to… moved file001.bin and
offered Undo; a name in the way raised Items already exist here; the top-bar overflow
has no Paste. The foreground-service video was re-recorded against the new bar at 16.1 s.

Verified: ./tools/verify.sh green, the code map current, 426 unit tests pass, and the
video decodes as H.264 1080x2400 with no audio.
2026-10-18 15:07:35 +02:00
SoftwareApp f9305d1070 Show the dataSync copy in a video, and answer its declaration
Play asks separately about FOREGROUND_SERVICE_DATA_SYNC: which use case, what
the service does, what the user loses if the task is deferred or interrupted,
and a video of the user triggering the work. The answers are now in section 5
of the release checklist, and the video is recorded.

The use case is Local processing -> Importing, exporting. Play's own chart
describes it as moving files from an SD card locally, which is what Paste and
Copy to... / Move to... do. The description (482/500 characters) names every
OperationKind - COPY, MOVE, DELETE, COMPRESS, EXTRACT - and states that the app
has no INTERNET permission, so network processing, backup/restore and media
transcoding are explicitly not ticked.

The video (18.0 s, captions burned in) shows a 1.8 GB synthetic folder copied to
another local folder: the selection and Copy, Paste here, the "Copying files"
notification with its progress bar, and the completed folder. It is cut from a
35.2 s raw take to remove the two waits; the target listing stays empty until
the copy completes, so those frames are progress rather than failure. The shade
was cleared of the phone's weather and Play cards first, leaving only Android's
generic USB cards, and every filename is synthetic.

Two traps are written down: do not press Up after Copy, because the selection
is already in AADemo and an extra Up makes Paste target AADemo ("Items already
exist here"); and open the shade only after cmd notification list shows the
app's notification, or the video shows no evidence of the service.

Verified: ./tools/verify.sh green, the code map current, links resolve, both
videos decode as H.264 1080x2400 with no audio, and the SRT has five cues.
2026-10-18 14:28:19 +02:00
SoftwareApp 9b8a32fbd6 Write the release notes, the permission answers, and the video
verify / gate (push) Has been cancelled
verify / release (push) Has been cancelled
Play asks three separate things before a file manager may keep All files
access: the What's new copy, a justification for why SAF and MediaStore cannot
carry it, and a short video of the permission in use. Writing them exposed two
stale claims and one privacy problem, so those are fixed here rather than
repeated.

- docs/RELEASE_NOTES.md holds the Console field at 450/500 characters, measured,
  and the longer announcement. The first release's copy leads with the claim no
  competitor makes (no ads, no INTERNET permission) and then proves the app is
  still a file manager.

- docs/PLAY_RELEASE_CHECKLIST.md section 5 holds the declaration answer at
  490/500 characters. It argues from what the Storage Access Framework and
  MediaStore cannot do - one picked tree, no volume enumeration or whole-device
  hierarchy, no arbitrary non-media files - and never from performance, which
  Google's wording rejects. Both APIs are named as already used where they can
  be, so the argument is not that they are useless.

- docs/PERMISSION_VIDEO.md and store-assets/video hold a 19.7 s captioned video
  recorded on the release build. The home-screen segment is cut because its
  library counts are the owner's real totals; the published copy resumes on the
  internal-storage listing. Also recorded: the emulator captures one frame in
  three seconds, and only appops set --uid ... deny brings the prompt back after
  Settings has granted the app-op.

- README and ROADMAP caught up with the build: the status stopped at M15, and
  the trash limitation still said there was no Empty trash and that expiry
  waited for the next delete, both changed in M19.

Verified: ./tools/verify.sh green, the code map current, the Play field measured
at 450 characters and the form answer at 490, and the video decoded as H.264
1080x2400, 19.666 s, no audio, with frames checked at the cut and the end state.
2026-10-18 13:59:50 +02:00
28 changed files with 859 additions and 374 deletions
+3
View File
@@ -118,6 +118,9 @@ comment. `app/src/test/java/…/ProjectInvariantsTest.kt` holds the source-level
| `docs/EDGE_CASE_TESTING.md` | What was verified, on which device or AVD, and what was not |
| `docs/PERFORMANCE.md` | The numbers that exist, and the ones that deliberately do not yet |
| `docs/PLAY_RELEASE_CHECKLIST.md` | Release only — work it in order |
| `docs/RELEASE_NOTES.md` | The Play **What's new** copy, at 500 characters, and the longer announcement |
| `docs/PERMISSION_VIDEO.md` | The declaration's 23-second video: what it shows, and how to re-shoot it |
| `docs/FGS_VIDEO.md` | The foreground-service video: the local copy, what was cut, and how to re-shoot it |
| `docs/COMPETITIVE_ANALYSIS.md`, `docs/MONETISATION.md`, `docs/STORE_LISTING.md` | Product context, pricing, and length-checked listing copy |
| `PRIVACY.md` | The policy text the store listing points at |
+64
View File
@@ -12,6 +12,56 @@ upload needs a **higher `versionCode`** than every previous upload.
### Added
- **The release notes exist before the release does, and their length is measured.** `docs/RELEASE_NOTES.md`
holds the copy for the Play Console's **What's new** field — **450 characters**, against Play's 500
limit, counted rather than estimated — plus a longer announcement for a website or GitHub release.
The Console field renders neither Markdown nor bullets, so the copy is plain sentences; the first
release's text leads with the claim the survey says no competitor makes (no ads, no `INTERNET`
permission) and then proves it is still a file manager, because "private" without the verbs reads as
a promise rather than a product. The file also says how the next one is written: move `[Unreleased]`
into a version heading **first**, so the changelog and the notes cannot describe different builds.
Two stale claims were found while writing it and fixed rather than repeated in the announcement: the
README's known limitations still said the trash had no "empty it now" action and that expiry waited
for the next delete (both changed in M19), and its status paragraph still stopped at M15.
- **The Permissions Declaration Form's answer is written down, at 490 characters.** Section 5 of
[PLAY_RELEASE_CHECKLIST](docs/PLAY_RELEASE_CHECKLIST.md) now holds the justification for
`MANAGE_EXTERNAL_STORAGE`, measured against the form's 500-character field. It argues from what the
Storage Access Framework and `MediaStore` cannot do — a grant covers one picked tree, neither
enumerates volumes or presents a whole-device hierarchy, and `MediaStore` exposes media collections
rather than arbitrary files and folders — and never from speed, which Google's own wording rejects.
The app's existing SAF fallback and its single best-effort delete are named, so neither API is
dismissed as useless; it is only unable to carry the core purpose.
- **The permission-use video is recorded, captioned and cut for privacy.** Play's form also asks for a
short video of the permission in use; `store-assets/video/permission-use.mp4` is **19.7 s** at
1080×2400 with six burned-in English captions (no audio), beside an uncaptioned twin and the `.srt`.
It shows the app's prompt, Android's grant screen (the phone's system UI is German, translated in the
captions), internal storage, non-media documents and a folder created through the same permission.
The raw take also showed the home screen, whose library counts are the owner's real totals, so the
published copy **cuts that segment** and resumes on the internal-storage listing. That is a privacy
redaction, not an edit to the evidence, and both copies share it.
Two traps are written down with it: the emulator under software emulation captures **one frame in
three seconds**, so the video has to come from the phone; and after Settings grants the app-op, a
package-level `appops set … deny` leaves the UID mode allowed, so only
`appops set --uid … deny` brings the prompt back.
- **The `dataSync` foreground-service declaration is answered before the Console asks.** Section 5 of
[PLAY_RELEASE_CHECKLIST](docs/PLAY_RELEASE_CHECKLIST.md) now records the
`FOREGROUND_SERVICE_DATA_SYNC` answers: the use case is **Local processing → Importing, exporting**
(Play's own example is moving files from an SD card), the **482-character** functionality
description, and the deferred and interrupted impact. Every `OperationKind` is local — `COPY`,
`MOVE`, `DELETE`, `COMPRESS`, `EXTRACT` — and the app has no `INTERNET` permission, so network
processing, backup/restore and media transcoding are explicitly not ticked. It also records that
the required video is **not** the All files access one: [FGS_VIDEO](docs/FGS_VIDEO.md) holds a
**16.1 s** captioned take of the local copy — selection, **Copy to…**, the destination picker,
**Copy here**, the notification with its progress bar, and the completed folder — cut from a
41.0 s raw recording to remove the two waits, with every filename synthetic. The traps are written
down too: the picker recentres at every level, and open the shade only once the notification
exists and let it settle.
- **A dot marks what an operation just produced.** Copy something, extract an archive, rename a file or make a
folder, and the rows it created carry a small dot until you open that folder again — so "what did that 4 GB
copy do?" has an answer, including when the copy went to a folder you were not looking at. The mark lives in
@@ -228,6 +278,20 @@ upload needs a **higher `versionCode`** than every previous upload.
### Changed
- **Copy and Cut are now Copy to… and Cut to…, and the clipboard is gone.** The selection bar's
first two actions open the destination picker directly; choosing a folder starts the copy — or the
cut — without leaving the folder you are in. The separate clipboard state, **Paste here**, and the
overflow's duplicate **Copy to… / Move to…** entries are removed, and the picker's cut verb reads
**Cut to… / Cut here**. A copy still keeps the selection for a second destination; a cut still
clears it because those rows leave; conflicts still ask, naming the picked folder. Five tests that
exercised the clipboard were removed, and the mark, restart and undo tests now go through the
picker; the foreground-service video was re-recorded against the new bar. Driven on the Xiaomi
phone: Copy to… copied 120 × 16 MB and Cut to… moved one file, and the top-bar overflow has no
Paste.
Why: the clipboard made a copy a two-step detour through another folder, which is exactly what M16
built the picker to avoid. Keeping both would have left two meanings for “Copy” in one bar.
- **File thumbnails are bigger.** The leading visual in a list row went from 28 dp to 48 dp and
the one in a grid cell from 40 dp to 96 dp, with the grid's minimum column width raised from
108 dp to 144 dp so the larger tile and the two-line name under it still fit. Neither size was
+21 -23
View File
@@ -12,25 +12,23 @@ no advertising or tracking SDKs.
## Status
**M15 — favourites: done.** A star in any folder's app bar puts that folder on the home screen, above
the libraries, where a folder that has gone is marked *not found* rather than silently dropped and
the row's own star removes it. Before it: **M14 — renaming a batch** (selecting several files and
choosing Rename opens a **pattern** dialog instead of the single-file one: one name, the number to
start at, and a preview of the names
it will produce — and the numbering **carries on from the folder's own**, so `series (1)` and
`series (2)` already there make the next batch start at 3. A batch that cannot be done is refused
before anything moves, naming the file in the way, and the whole batch is one undo step. Before it:
**M13 — video thumbnails** (a video row shows a frame of the video itself rather than a film icon —
the platform's own retriever, through Coil, with a frame taken a second in and the icon kept as the
fallback when a file cannot be decoded), **M12 — duplicate finder** (size, then the head of every
candidate, then the survivors in full), **M11 — library views** (a **Libraries** section on the
root screen — Images, Videos, Audio, Documents, Archives and Recent — whose rows open
ordinary listings of those files, each carrying a count from the search index), and **M10 — store
assets**: the app is named **Plain Files**, the icon and feature graphic come from the app's own
vectors, and [docs/STORE_LISTING.md](docs/STORE_LISTING.md) holds length-checked listing copy.
Screenshots exist for 5 phone (1080×2160), 4 on a 7-inch tablet (1200×1920) and 4 on a 10-inch
tablet (2560×1600) — but they **predate M11**, so the home screen in them is the old volume list and
they will need re-shooting, which the library views make a privacy question as well as a cosmetic one
**M20 — launcher shortcuts: done.** Long-press the app icon for **Images**, **Recent** and **Trash**.
Since the last release build: **M19** gave the trash its 24-hour window, **Empty trash** and a sweep on
open; **M18** let compression store files instead of squeezing them; **M17** put a dot on the rows an
operation produced; and **M16** added **Copy to… / Cut to…** with a destination picker that does not
take you out of the folder you are in. Before them: **M15 — favourites** (a star puts a folder on the
home screen), **M14 — batch rename** (one pattern, a start number, and a series that carries on from
the folder's own), **M13 — video thumbnails** (a frame of the video itself rather than a film icon),
**M12 — duplicate finder** (size, then the head of every candidate, then the survivors in full),
**M11 — library views** (Images, Videos, Audio, Documents, Archives and Recent, counted from the
search index), and **M10 — store assets**: the app is named **Plain Files**, the icon and feature
graphic come from the app's own vectors, [docs/STORE_LISTING.md](docs/STORE_LISTING.md) holds
length-checked listing copy, and [docs/RELEASE_NOTES.md](docs/RELEASE_NOTES.md) holds the copy for the
Console's **What's new** field.
Screenshots exist for 8 phone (1080×2160), 4 on a 7-inch tablet (1200×1920) and 4 on a 10-inch
tablet (2560×1600). The phone set was re-shot on 2026-10-18 and covers M16-M20; the tablet sets
**predate M11** and should be regenerated on a machine with KVM before the listing goes live
([docs/STORE_LISTING.md](docs/STORE_LISTING.md)).
## Tech stack
@@ -179,10 +177,10 @@ UI.** Translated UI text has to be supplied in `values-<locale>/`.
- **The trash is a time window, not a bin you manage.** A delete stages the item in a hidden
`.plainfiles-trash` folder on the same volume and keeps it for 24 hours; the **Trash** entry
in the overflow menu lists what is still there and puts a whole batch back. There is no
"empty it now" action — expired batches are swept the next time something is deleted — and a
name taken again in the meantime is never overwritten, so a restored item can arrive beside
the new one rather than replacing it.
in the overflow menu lists what is still there, puts a whole batch back, and offers **Empty
trash** for when the window is not what you want. Opening the trash sweeps what has expired,
so retention no longer waits for the next delete. A name taken again in the meantime is never
overwritten, so a restored item can arrive beside the new one rather than replacing it.
- **Where a trashed item came from is remembered in the app's own database**, not on the
volume. The staged files are the truth and the database is only an index, so the two are
reconciled in both directions: an entry whose file has gone is not offered back, and a
@@ -31,7 +31,7 @@ data class TransferItem(
)
/**
* Turns "copy/paste these items into that folder" into a per-item decision, before a
* Turns "copy or move these items into that folder" into a per-item decision, before a
* single byte is written.
*
* Doing this as pure logic keeps the awkward cases — a name colliding with another
@@ -103,14 +103,14 @@ fun CompressDialog(
}
/**
* The **Copy to… / Move to…** picker.
* The **Copy to… / Cut to…** picker.
*
* A folder browser in a dialog: the volumes first, then one level of folders at a time, with the trail
* above them. Files are never offered — a file cannot be a destination — and the confirm button stays
* disabled on the volume list, because "copy into the volume" is a folder, not the list of volumes.
*
* The picker only chooses; the copy itself goes through the same plan and conflict question as a paste,
* with the picked folder as the target (see `BrowserViewModel.confirmTransferTo`).
* The picker only chooses; the copy itself goes through the same plan and conflict question as any
* other transfer, with the picked folder as the target (see `BrowserViewModel.confirmTransferTo`).
*/
@Composable
fun TransferToDialog(
@@ -188,11 +188,11 @@ fun TransferToDialog(
/** The dialog's title for the verb. */
private fun titleFor(cut: Boolean): Int =
if (cut) R.string.transfer_picker_move_title else R.string.transfer_picker_copy_title
if (cut) R.string.transfer_picker_cut_title else R.string.transfer_picker_copy_title
/** The confirm button's label for the verb. */
private fun hereFor(cut: Boolean): Int =
if (cut) R.string.transfer_picker_move_here else R.string.transfer_picker_copy_here
if (cut) R.string.transfer_picker_cut_here else R.string.transfer_picker_copy_here
/**
* Renaming several files at once, with the numbering worked out before anything moves.
@@ -400,7 +400,7 @@ fun ConfirmDialog(
}
/**
* The prompt shown when a paste would overwrite something.
* The prompt shown when a transfer would overwrite something.
*
* The engine refuses to guess ([ConflictPolicy.ASK] is surfaced rather than resolved), so
* the choice is offered here and then applied to the whole batch.
@@ -397,7 +397,6 @@ fun BrowserScreen(
searchScope = state.searchScope,
// The choice only exists when there is a folder to make it about.
scopeChoosable = state.path != null,
canPaste = state.clipboard?.isEmpty == false,
onUp = viewModel::navigateUp,
onQuery = viewModel::setQuery,
onSearchOpen = { open ->
@@ -422,7 +421,6 @@ fun BrowserScreen(
)
},
onSort = { showSort = true },
onPaste = viewModel::paste,
onToggleBookmark = viewModel::toggleBookmark,
onRefresh = viewModel::refresh,
onUsage = viewModel::openUsage,
@@ -446,10 +444,8 @@ fun BrowserScreen(
if (state.isSelecting) {
SelectionBar(
state = state,
onCopy = { viewModel.copyToClipboard(state.selection.toList(), cut = false) },
onCut = { viewModel.copyToClipboard(state.selection.toList(), cut = true) },
onCopyTo = { viewModel.startTransferTo(cut = false) },
onMoveTo = { viewModel.startTransferTo(cut = true) },
onCutTo = { viewModel.startTransferTo(cut = true) },
onDelete = { confirmDelete = state.selection.toList() },
onDetails = { detailsFor = state.selectedEntries.firstOrNull() },
onRename = {
@@ -11,7 +11,6 @@ import androidx.compose.material.icons.filled.FileCopy
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.PieChart
import androidx.compose.material.icons.filled.Public
import androidx.compose.material.icons.filled.ContentPaste
import androidx.compose.material.icons.filled.Refresh
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Sort
@@ -42,6 +41,7 @@ import androidx.compose.ui.unit.dp
import de.softwareapp_hb.filemanager.R
/** The browser's app bar: title, up, the favourite star, and the search / sort / overflow actions. */
@Suppress("LongParameterList")
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun BrowserTopBar(
@@ -55,13 +55,11 @@ fun BrowserTopBar(
searchScope: SearchScope,
/** Whether the scope is the user's to choose at all; see the note beside the toggle. */
scopeChoosable: Boolean,
canPaste: Boolean,
onUp: () -> Unit,
onQuery: (String) -> Unit,
onSearchOpen: (Boolean) -> Unit,
onSearchScope: () -> Unit,
onSort: () -> Unit,
onPaste: () -> Unit,
onToggleBookmark: () -> Unit,
onRefresh: () -> Unit,
onUsage: () -> Unit,
@@ -101,6 +99,81 @@ fun BrowserTopBar(
},
actions = {
if (searchOpen) {
SearchFieldActions(
query = query,
searchScope = searchScope,
scopeChoosable = scopeChoosable,
searchField = searchField,
onQuery = onQuery,
onSearchScope = onSearchScope,
onSearchOpen = onSearchOpen,
)
} else {
if (canBookmark) {
IconButton(onClick = onToggleBookmark) {
Icon(
// An outline is the invitation and a filled star is the state, which is
// how a star behaves everywhere else it appears.
imageVector = if (bookmarked) Icons.Filled.Star else Icons.Filled.StarBorder,
contentDescription = stringResource(
if (bookmarked) {
R.string.browser_action_unbookmark
} else {
R.string.browser_action_bookmark
},
),
tint = if (bookmarked) {
MaterialTheme.colorScheme.primary
} else {
MaterialTheme.colorScheme.onSurfaceVariant
},
)
}
}
IconButton(onClick = { onSearchOpen(true) }) {
Icon(
imageVector = Icons.Filled.Search,
contentDescription = stringResource(R.string.browser_search_hint),
)
}
IconButton(onClick = onSort) {
Icon(
imageVector = Icons.Filled.Sort,
contentDescription = stringResource(R.string.browser_action_sort),
)
}
Box {
IconButton(onClick = { menuOpen = true }) {
Icon(
imageVector = Icons.Filled.MoreVert,
contentDescription = stringResource(R.string.browser_action_more),
)
}
BrowserOverflowMenu(
expanded = menuOpen,
onDismiss = { menuOpen = false },
onDuplicates = onDuplicates,
onUsage = onUsage,
onTrash = onTrash,
onRefresh = onRefresh,
)
}
}
},
)
}
/** The app bar while the search field is open: the field, its scope toggle, and the close action. */
@Composable
private fun SearchFieldActions(
query: String,
searchScope: SearchScope,
scopeChoosable: Boolean,
searchField: FocusRequester,
onQuery: (String) -> Unit,
onSearchScope: () -> Unit,
onSearchOpen: (Boolean) -> Unit,
) {
OutlinedTextField(
value = query,
onValueChange = onQuery,
@@ -153,81 +226,41 @@ fun BrowserTopBar(
contentDescription = stringResource(R.string.browser_search_clear),
)
}
} else {
if (canBookmark) {
IconButton(onClick = onToggleBookmark) {
Icon(
// An outline is the invitation and a filled star is the state, which is
// how a star behaves everywhere else it appears.
imageVector = if (bookmarked) Icons.Filled.Star else Icons.Filled.StarBorder,
contentDescription = stringResource(
if (bookmarked) {
R.string.browser_action_unbookmark
} else {
R.string.browser_action_bookmark
},
),
tint = if (bookmarked) {
MaterialTheme.colorScheme.primary
} else {
MaterialTheme.colorScheme.onSurfaceVariant
},
)
}
}
IconButton(onClick = { onSearchOpen(true) }) {
Icon(
imageVector = Icons.Filled.Search,
contentDescription = stringResource(R.string.browser_search_hint),
)
}
IconButton(onClick = onSort) {
Icon(
imageVector = Icons.Filled.Sort,
contentDescription = stringResource(R.string.browser_action_sort),
)
}
Box {
IconButton(onClick = { menuOpen = true }) {
Icon(
imageVector = Icons.Filled.MoreVert,
contentDescription = stringResource(R.string.browser_action_more),
)
}
DropdownMenu(expanded = menuOpen, onDismissRequest = { menuOpen = false }) {
if (canPaste) {
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_paste)) },
leadingIcon = { Icon(Icons.Filled.ContentPaste, contentDescription = null) },
onClick = { menuOpen = false; onPaste() },
)
}
/** The app bar's overflow: the four actions that do not deserve a permanent icon. */
@Composable
private fun BrowserOverflowMenu(
expanded: Boolean,
onDismiss: () -> Unit,
onDuplicates: () -> Unit,
onUsage: () -> Unit,
onTrash: () -> Unit,
onRefresh: () -> Unit,
) {
DropdownMenu(expanded = expanded, onDismissRequest = onDismiss) {
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_duplicates)) },
leadingIcon = { Icon(Icons.Filled.FileCopy, contentDescription = null) },
onClick = { menuOpen = false; onDuplicates() },
onClick = { onDismiss(); onDuplicates() },
)
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_disk_usage)) },
leadingIcon = { Icon(Icons.Filled.PieChart, contentDescription = null) },
onClick = { menuOpen = false; onUsage() },
onClick = { onDismiss(); onUsage() },
)
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_trash)) },
leadingIcon = { Icon(Icons.Filled.Delete, contentDescription = null) },
onClick = { menuOpen = false; onTrash() },
onClick = { onDismiss(); onTrash() },
)
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_refresh)) },
leadingIcon = { Icon(Icons.Filled.Refresh, contentDescription = null) },
onClick = { menuOpen = false; onRefresh() },
onClick = { onDismiss(); onRefresh() },
)
}
}
}
},
)
}
/**
* How wide the search field may be.
@@ -32,11 +32,6 @@ enum class SearchScope {
EVERYWHERE,
}
/** What the user has cut or copied, waiting to be pasted somewhere. */
data class Clipboard(val paths: List<StoragePath>, val cut: Boolean) {
val isEmpty: Boolean get() = paths.isEmpty()
}
/** A compress waiting for its two answers: the archive's name, and whether to compress it. */
data class CompressRequest(val paths: List<StoragePath>, val name: String)
@@ -58,11 +53,10 @@ data class PickerFolder(
}
/**
* The destination picker behind **Copy to…** and **Move to…**.
* The destination picker behind **Copy to…** and **Cut to…**.
*
* The operation itself is [Clipboard] with an explicit target instead of "the folder I am in", so this
* holds what the picker needs to draw and nothing about the copy: [paths] is what was selected when the
* picker opened, [cut] says which verb the user chose.
* It holds what the picker needs to draw and nothing about the operation: [paths] is what was
* selected when the picker opened, [cut] says whether the chosen verb is Cut or Copy.
*/
data class TransferPicker(
val paths: List<StoragePath>,
@@ -118,7 +112,7 @@ data class UiMessage(
}
/**
* A paste that hit existing names, waiting for the user to choose how to resolve it.
* A transfer that hit existing names, waiting for the user to choose how to resolve it.
*
* The engine deliberately does not answer conflicts ([ConflictPolicy.ASK] is surfaced
* rather than guessed), so this is where that decision lives.
@@ -173,7 +167,7 @@ data class DetailFocus(
*/
sealed interface Undo {
/**
* Move each item back where it came from. Covers a rename and a pasted cut alike,
* Move each item back where it came from. Covers a rename and a cut alike,
* because both are the same operation seen from different angles.
*/
data class Relocate(val moves: List<UndoMove>) : Undo
@@ -325,7 +319,6 @@ data class BrowserUiState(
val selection: Set<StoragePath> = emptySet(),
/** The entry the wide-screen detail pane is showing; `null` until the user picks one. */
val focus: DetailFocus? = null,
val clipboard: Clipboard? = null,
/**
* The rows an operation produced in this folder since it was last read, drawn as a dot.
*
@@ -333,7 +326,7 @@ data class BrowserUiState(
* cleared by opening the folder again and forgotten when the process ends.
*/
val changed: Set<StoragePath> = emptySet(),
/** The **Copy to… / Move to…** destination picker, when one is open. */
/** The **Copy to… / Cut to…** destination picker, when one is open. */
val transferPicker: TransferPicker? = null,
/** A compress waiting for its name and its compression choice. */
val compressRequest: CompressRequest? = null,
@@ -139,7 +139,7 @@ class BrowserViewModel(
/**
* What each folder gained since it was last read, waiting to be shown as a dot.
*
* In memory and per folder, for the same reason the clipboard is: the mark means "new since you last
* In memory and per folder, for the same reason the selection is: the mark means "new since you last
* looked here", so it is spent by the read that shows it, and a restart starts clean. Nothing here
* needs a timestamp, a timer or a background job — a row is new because an operation said so.
*/
@@ -515,12 +515,12 @@ class BrowserViewModel(
_state.update { state -> if (state.path == path) state.copy(freeBytes = free) else state }
}
// ------------------------------------------------------- copy to… / move to…
// ------------------------------------------------------- copy to… / cut to…
/**
* Opens the destination picker for the current selection.
*
* The same two verbs [paste] offers, except that the destination is chosen here instead of being
* The two verbs the selection bar offers, with the destination chosen here instead of being
* whatever folder happens to be on screen — which is the point: copying into another folder no
* longer means leaving the one you are in, and because the selection stays, a second destination is
* two taps.
@@ -552,9 +552,9 @@ class BrowserViewModel(
/**
* Copies — or moves — the selection into the folder the picker is showing.
*
* A name conflict asks exactly what a paste asks, and the prompt carries the picked folder, so the
* answer applies to the right one. A copy leaves the selection in place, which is what makes a
* second destination two taps; a move clears it, because those rows are about to go.
* A name conflict asks before overwriting, and the prompt carries the picked folder, so the answer
* applies to the right one. A copy leaves the selection in place, which is what makes a second
* destination two taps; a move clears it, because those rows are about to go.
*/
fun confirmTransferTo() {
val picker = _state.value.transferPicker ?: return
@@ -794,10 +794,9 @@ class BrowserViewModel(
*
* Deliberately narrow. A folder is worth coming back to — losing your place deep in a
* tree is the most annoying thing an Android file manager can do — and a sort order or
* view mode that resets on every process death is just noise. Three things are left
* view mode that resets on every process death is just noise. Two things are left
* out on purpose: the **search query**, because restoring one would hide the folder's
* contents on launch with no visible cause; the **selection**, which is transient; and
* the **clipboard**, because a paste that survived a reboot would be a nasty surprise.
* contents on launch with no visible cause; and the **selection**, which is transient.
*/
private fun restoredViewState(): BrowserUiState {
val savedSortKey = savedState.get<String>(KEY_SORT_KEY)
@@ -1925,40 +1924,6 @@ class BrowserViewModel(
_state.update { it.copy(scratch = null) }
}
// ---------------------------------------------------------------- clipboard
fun copyToClipboard(paths: List<StoragePath>, cut: Boolean) {
_state.update { it.copy(clipboard = Clipboard(paths, cut), selection = emptySet()) }
}
/**
* Paste the clipboard into the current directory.
*
* A clash is not resolved here: the plan is checked first and, if anything would be
* overwritten, the user is asked through [BrowserUiState.conflict].
*/
fun paste() {
val clipboard = _state.value.clipboard ?: return
val target = _state.value.path ?: return
val source = storage.activeSource() ?: return
viewModelScope.launch {
val conflicts = runCatching {
FileOperations(source)
.planTransfer(clipboard.paths, target, ConflictPolicy.ASK)
.count { it.action == TransferAction.ASK }
}.getOrDefault(0)
if (conflicts > 0) {
_state.update {
it.copy(conflict = ConflictPrompt(clipboard.paths, target, clipboard.cut, conflicts))
}
} else {
transfer(clipboard.paths, target, clipboard.cut, ConflictPolicy.KEEP_BOTH)
}
}
}
fun resolveConflict(policy: ConflictPolicy) {
val prompt = _state.value.conflict ?: return
_state.update { it.copy(conflict = null) }
@@ -2000,7 +1965,7 @@ class BrowserViewModel(
notifier.stop()
}
_state.update { it.copy(loading = false, clipboard = if (cut) null else it.clipboard) }
_state.update { it.copy(loading = false) }
if (result.succeeded) {
val landedNow = targetNames(source, target)
markChanged(target, (landedNow - landedBefore).map { target.child(it) })
@@ -2048,7 +2013,7 @@ class BrowserViewModel(
* Save the shared files into [folder] — wherever the user navigated to.
*
* Names come from the sending app where it offers one, and clashes go through the same
* [NameAllocator] a paste does, so sharing the same file twice cannot overwrite the
* [NameAllocator] a copy does, so sharing the same file twice cannot overwrite the
* first copy.
*/
fun receiveInto(folder: StoragePath) {
@@ -1,13 +1,6 @@
package de.softwareapp_hb.filemanager.ui.browser
import androidx.compose.foundation.horizontalScroll
import androidx.compose.foundation.layout.Box
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
@@ -23,7 +16,6 @@ import androidx.compose.material.icons.filled.ContentCut
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.OpenInNew
import androidx.compose.material.icons.filled.SelectAll
import androidx.compose.material.icons.filled.Share
@@ -86,10 +78,8 @@ fun StorageAccessPrompt(
@Suppress("LongParameterList")
fun SelectionBar(
state: BrowserUiState,
onCopy: () -> Unit,
onCut: () -> Unit,
onCopyTo: () -> Unit,
onMoveTo: () -> Unit,
onCutTo: () -> Unit,
onDelete: () -> Unit,
onDetails: () -> Unit,
onRename: () -> Unit,
@@ -127,43 +117,17 @@ fun SelectionBar(
.padding(start = 8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
IconButton(onClick = onCopy) {
Icon(Icons.Filled.ContentCopy, contentDescription = stringResource(R.string.browser_action_copy))
}
IconButton(onClick = onCut) {
Icon(Icons.Filled.ContentCut, contentDescription = stringResource(R.string.browser_action_cut))
}
/*
* Copy to… and Move to… are the same two verbs with a destination picker attached, so they sit
* behind one overflow button rather than adding two more icons to a bar that already scrolls.
*/
var destinationMenu by remember { mutableStateOf(false) }
Box {
IconButton(onClick = { destinationMenu = true }) {
IconButton(onClick = onCopyTo) {
Icon(
Icons.Filled.MoreVert,
contentDescription = stringResource(R.string.browser_action_more),
Icons.Filled.ContentCopy,
contentDescription = stringResource(R.string.browser_action_copy_to),
)
}
DropdownMenu(
expanded = destinationMenu,
onDismissRequest = { destinationMenu = false },
) {
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_copy_to)) },
onClick = {
destinationMenu = false
onCopyTo()
},
IconButton(onClick = onCutTo) {
Icon(
Icons.Filled.ContentCut,
contentDescription = stringResource(R.string.browser_action_cut_to),
)
DropdownMenuItem(
text = { Text(stringResource(R.string.browser_action_move_to)) },
onClick = {
destinationMenu = false
onMoveTo()
},
)
}
}
/*
* Rename is offered for any selection: one file is renamed by name and several by
+4 -7
View File
@@ -105,9 +105,6 @@
<string name="browser_action_new_folder">New folder</string>
<string name="browser_action_sort">Sort</string>
<string name="browser_action_details">Details</string>
<string name="browser_action_copy">Copy</string>
<string name="browser_action_cut">Move</string>
<string name="browser_action_paste">Paste here</string>
<!-- Compressing: the name, and whether to squeeze the contents. -->
<string name="compress_dialog_title">Compress</string>
<string name="compress_dialog_name">Archive name</string>
@@ -115,13 +112,13 @@
<string name="compress_dialog_hint">Off stores the files as they are: faster to build, and ready to copy off the phone.</string>
<string name="compress_dialog_confirm">Compress</string>
<string name="compress_dialog_cancel">Cancel</string>
<!-- The two verbs that pick the destination instead of pasting into the folder on screen. -->
<!-- The two verbs that pick the destination directly. -->
<string name="browser_action_copy_to">Copy to…</string>
<string name="browser_action_move_to">Move to…</string>
<string name="browser_action_cut_to">Cut to…</string>
<string name="transfer_picker_copy_title">Copy to…</string>
<string name="transfer_picker_move_title">Move to…</string>
<string name="transfer_picker_cut_title">Cut to…</string>
<string name="transfer_picker_copy_here">Copy here</string>
<string name="transfer_picker_move_here">Move here</string>
<string name="transfer_picker_cut_here">Cut here</string>
<string name="transfer_picker_up">Up</string>
<string name="transfer_picker_cancel">Cancel</string>
<string name="transfer_picker_empty">No folders here</string>
@@ -43,13 +43,11 @@ class BrowserTopBarTest {
searchOpen = searchOpen,
searchScope = SearchScope.FOLDER,
scopeChoosable = true,
canPaste = false,
onUp = {},
onQuery = {},
onSearchOpen = {},
onSearchScope = {},
onSort = {},
onPaste = {},
onToggleBookmark = {},
onRefresh = {},
onUsage = {},
@@ -418,23 +418,6 @@ class BrowserViewModelTest {
assertTrue(storage.contains(documents.child("a.txt")))
}
@Test
fun `a paste into the folder on screen names no destination and offers no action`() {
val model = viewModel()
model.openDirectory(root)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
model.openDirectory(documents)
model.paste()
val message = model.state.value.message
assertNotNull(message)
assertEquals(R.plurals.message_copied, message!!.textRes)
assertNull(message.destination)
assertNull(message.action)
assertNull(message.actionLabelRes)
}
@Test
fun `the message's undo action is the undo`() {
val model = viewModel()
@@ -469,17 +452,6 @@ class BrowserViewModelTest {
assertEquals(R.string.browser_action_undo, message.actionLabelRes)
}
@Test
fun `a copy into the folder on screen marks the copy`() {
val model = viewModel()
model.openDirectory(documents)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
model.paste()
assertEquals(setOf(documents.child("a.txt")), model.state.value.changed)
}
@Test
fun `a copy into another folder marks it there, not here`() {
val model = viewModel()
@@ -500,9 +472,13 @@ class BrowserViewModelTest {
@Test
fun `reading the folder again spends its marks`() {
val model = viewModel()
model.openDirectory(downloads)
model.toggleSelection(downloads.child("a.txt"))
model.startTransferTo(cut = false)
model.pickerOpen(documents)
model.confirmTransferTo()
model.openDirectory(documents)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
model.paste()
assertTrue(model.state.value.changed.isNotEmpty())
model.openDirectory(root)
@@ -1596,57 +1572,6 @@ class BrowserViewModelTest {
assertTrue(recordedNotifications.isEmpty())
}
@Test
fun `copy then paste duplicates into the current folder`() {
val model = viewModel()
model.openDirectory(root)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
assertNotNull(model.state.value.clipboard)
model.openDirectory(documents)
model.paste()
assertTrue(storage.contains(documents.child("a.txt")))
assertTrue(storage.contains(downloads.child("a.txt")))
assertEquals(listOf(OperationKind.COPY), recordedNotifications)
assertNotNull(model.state.value.clipboard)
}
@Test
fun `cut then paste moves and clears the clipboard`() {
val model = viewModel()
model.openDirectory(root)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = true)
model.openDirectory(documents)
model.paste()
assertTrue(storage.contains(documents.child("a.txt")))
assertFalse(storage.contains(downloads.child("a.txt")))
assertEquals(listOf(OperationKind.MOVE), recordedNotifications)
assertNull(model.state.value.clipboard)
}
@Test
fun `a pasted name that already exists asks before overwriting`() {
val model = viewModel()
storage.addFile(documents.child("a.txt"), "already here")
model.openDirectory(root)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
model.openDirectory(documents)
model.paste()
val prompt = model.state.value.conflict
assertNotNull(prompt)
assertEquals(1, prompt!!.conflicts)
assertEquals("already here", storage.contentOf(documents.child("a.txt")))
model.resolveConflict(ConflictPolicy.REPLACE)
assertEquals("first", storage.contentOf(documents.child("a.txt")))
assertNull(model.state.value.conflict)
}
@Test
fun `without any grant the browser asks for a folder`() {
location.setSource(null)
@@ -1792,18 +1717,16 @@ class BrowserViewModelTest {
}
@Test
fun `a selection and a clipboard do not survive a restart`() {
fun `a selection does not survive a restart`() {
val saved = SavedStateHandle()
viewModel(savedState = saved).apply {
openDirectory(downloads)
toggleSelection(downloads.child("a.txt"))
copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
}
val relaunched = viewModel(savedState = saved)
assertFalse(relaunched.state.value.isSelecting)
assertNull(relaunched.state.value.clipboard)
}
@Test
@@ -2010,12 +1933,13 @@ class BrowserViewModelTest {
}
@Test
fun `undoing a cut-paste moves the item back`() {
fun `undoing a cut to a chosen folder moves the item back`() {
val model = viewModel()
model.openDirectory(downloads)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = true)
model.openDirectory(documents)
model.paste()
model.toggleSelection(downloads.child("a.txt"))
model.startTransferTo(cut = true)
model.pickerOpen(documents)
model.confirmTransferTo()
assertTrue(storage.contains(documents.child("a.txt")))
model.undo()
@@ -2025,13 +1949,13 @@ class BrowserViewModelTest {
}
@Test
fun `a copy is not undoable, because nothing was changed`() {
fun `a copy to a chosen folder is not undoable, because nothing was changed`() {
val model = viewModel()
model.openDirectory(root)
model.copyToClipboard(listOf(downloads.child("a.txt")), cut = false)
model.openDirectory(documents)
model.paste()
model.openDirectory(downloads)
model.toggleSelection(downloads.child("a.txt"))
model.startTransferTo(cut = false)
model.pickerOpen(documents)
model.confirmTransferTo()
assertNull(model.state.value.undo)
}
@@ -3,7 +3,6 @@ package de.softwareapp_hb.filemanager.ui.browser
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import de.softwareapp_hb.filemanager.core.FileEntry
import de.softwareapp_hb.filemanager.core.StoragePath
import de.softwareapp_hb.filemanager.ui.theme.FileManagerTheme
@@ -44,10 +43,8 @@ class SelectionBarTest {
entries = entries,
selection = entries.map { it.path }.toSet(),
),
onCopy = {},
onCut = {},
onCopyTo = {},
onMoveTo = {},
onCutTo = {},
onDelete = {},
onDetails = {},
onRename = {},
@@ -63,13 +60,11 @@ class SelectionBarTest {
}
@Test
fun `the destination verbs live in the overflow menu`() {
fun `the destination verbs are on the bar`() {
bar(selected = 1)
compose.onNodeWithContentDescription("More options").performClick()
compose.onNodeWithText("Copy to…").assertExists()
compose.onNodeWithText("Move to…").assertExists()
compose.onNodeWithContentDescription("Copy to…").assertExists()
compose.onNodeWithContentDescription("Cut to…").assertExists()
}
@Test
+12 -17
View File
@@ -2,7 +2,7 @@
Generated from the source by `tools/make-code-map.py` - do not edit by hand. Regenerate it after a change (`python3 tools/make-code-map.py`); `--check` exits non-zero when this file is stale.
80 source files, 13902 lines - 37 test files, 431 tests. The behaviour index at the end lists every test name, and in this project a test name is a sentence about what the app does, so it doubles as the specification.
80 source files, 13853 lines - 37 test files, 426 tests. The behaviour index at the end lists every test name, and in this project a test name is a sentence about what the app does, so it doubles as the specification.
Start at `AGENTS.md`. What is done, and why: `docs/ROADMAP.md` and `CHANGELOG.md`. What was verified by hand rather than by a test: `docs/EDGE_CASE_TESTING.md`.
@@ -29,7 +29,7 @@ Pure Kotlin, **no Android imports**: paths, file names, kinds, sorting, formatti
| `StoragePath.kt` | 89 | A normalized, absolute, backend-agnostic storage path. StoragePath | `StoragePathTest` (8) |
| `ThumbnailKey.kt` | 22 | The identity of a thumbnail: which file it came from, and which version of that file. ThumbnailKey | `ThumbnailKeyTest` (4) |
| `Timestamps.kt` | 20 | Timestamps for the details sheet. Timestamps | - |
| `TransferPlanner.kt` | 105 | Turns "copy/paste these items into that folder" into a per-item decision, before a single byte is written. ConflictPolicy, TransferAction, TransferSource, TransferItem, TransferPlanner | `TransferPlannerTest` (5) |
| `TransferPlanner.kt` | 105 | Turns "copy or move these items into that folder" into a per-item decision, before a single byte is written. ConflictPolicy, TransferAction, TransferSource, TransferItem, TransferPlanner | `TransferPlannerTest` (5) |
## data/
@@ -101,15 +101,15 @@ The browser screen: view model, state, list and grid, dialogs, selection bar
| `BrowserDetailPane.kt` | 131 | The second pane of the wide layout: what is inside the folder the user picked, or a preview and the details of the file they picked. DetailPane(), FolderPreview(), ImagePreview() | - |
| `BrowserDialogs.kt` | 444 | Compressing something, with the one choice that changes what comes out. CompressDialog(), TransferToDialog(), titleFor(), hereFor(), BatchRenameDialog(), PREVIEW_NAMES, batchRenameNote(), NameDialog(), ConfirmDialog(), ConflictDialog() | `BrowserDialogsTest` (5) |
| `BrowserRoots.kt` | 270 | A row on the root screen: a volume, with its free space when the platform reports it. RootRow(), itemCountLabel(), EmptyState(), LibrarySectionHeader(), BookmarkSectionHeader(), SectionHeader(), BookmarkRow(), LibraryRow(), Breadcrumbs() | `BrowserRootsTest` (4) |
| `BrowserScreen.kt` | 661 | The browser, and everything that can be on top of it. BrowserScreen(), messageText() | - |
| `BrowserTopBar.kt` | 238 | The browser's app bar: title, up, the favourite star, and the search / sort / overflow actions. BrowserTopBar(), SEARCH_FIELD_WIDTH | `BrowserTopBarTest` (4) |
| `BrowserUiState.kt` | 391 | One immutable description of everything the browser shows. ViewMode, SearchScope, Clipboard, CompressRequest, PickerFolder, TransferPicker, MessageAction, UiMessage, ConflictPrompt, RootItem, Bookmark, DetailFocus, Undo, UndoMove, Overlay, BrowserUiState | - |
| `BrowserViewModel.kt` | 2601 | Drives the browser screen. BrowserViewModel, ArchivePreview | `BrowserViewModelTest` (117) |
| `BrowserScreen.kt` | 657 | The browser, and everything that can be on top of it. BrowserScreen(), messageText() | - |
| `BrowserTopBar.kt` | 271 | The browser's app bar: title, up, the favourite star, and the search / sort / overflow actions. BrowserTopBar(), SearchFieldActions(), BrowserOverflowMenu(), SEARCH_FIELD_WIDTH | `BrowserTopBarTest` (4) |
| `BrowserUiState.kt` | 384 | One immutable description of everything the browser shows. ViewMode, SearchScope, CompressRequest, PickerFolder, TransferPicker, MessageAction, UiMessage, ConflictPrompt, RootItem, Bookmark, DetailFocus, Undo, UndoMove, Overlay, BrowserUiState | - |
| `BrowserViewModel.kt` | 2566 | Drives the browser screen. BrowserViewModel, ArchivePreview | `BrowserViewModelTest` (112) |
| `DetailsSheet.kt` | 109 | Name, location, size, type and modified date for one entry. DetailsSheet(), DetailLines(), DetailLine() | - |
| `EntryIntents.kt` | 58 | Wraps an entry's path in a content:// URI another app may read. contentUriFor(), viewIntent(), shareIntent() | - |
| `IncomingBar.kt` | 60 | The bar shown while another app is waiting on this one. IncomingBar() | - |
| `IncomingRequest.kt` | 46 | What another app asked this one to do. IncomingRequest | - |
| `SelectionBar.kt` | 219 | The contextual action bar shown while entries are selected. StorageAccessPrompt(), SelectionBar() | `SelectionBarTest` (3) |
| `SelectionBar.kt` | 183 | The contextual action bar shown while entries are selected. StorageAccessPrompt(), SelectionBar() | `SelectionBarTest` (3) |
| `SortSheet.kt` | 128 | Sort key, direction, hidden files and list/grid — all in one sheet. sortKeyLabel(), SortSheet() | - |
## ui/viewer/
@@ -595,7 +595,7 @@ Every test name in the suite, by file: the fastest way to see whether something
- a library or the root list has nothing to star
- the star gives way to the search field
### `ui/browser/BrowserViewModelTest.kt` (117)
### `ui/browser/BrowserViewModelTest.kt` (112)
- starts on the root list
- opening a folder lists it with directories first and natural order
@@ -613,10 +613,8 @@ Every test name in the suite, by file: the fastest way to see whether something
- cancelling the picker copies nothing
- a copy says where it went and offers to show it
- show takes the user to the folder the copy went to
- a paste into the folder on screen names no destination and offers no action
- the message's undo action is the undo
- a move to a chosen folder offers undo rather than show
- a copy into the folder on screen marks the copy
- a copy into another folder marks it there, not here
- reading the folder again spends its marks
- a rename marks the name it produced
@@ -676,9 +674,6 @@ Every test name in the suite, by file: the fastest way to see whether something
- rename moves the entry to the new name
- delete removes the selected entries directly when the platform has no dialog
- delete prefers the platform dialog and leaves the files alone until it returns
- copy then paste duplicates into the current folder
- cut then paste moves and clears the clipboard
- a pasted name that already exists asks before overwriting
- without any grant the browser asks for a folder
- a granted tree becomes the only root
- focusing a folder in the master pane lists it for the detail pane
@@ -688,7 +683,7 @@ Every test name in the suite, by file: the fastest way to see whether something
- a focused volume previews the contents of that volume
- the browsed folder and view settings survive a restart
- a search query is not restored, so the folder is not hidden on launch
- a selection and a clipboard do not survive a restart
- a selection does not survive a restart
- restarting on the roots screen stays on the roots screen
- search reaches into a subfolder, not just the one being browsed
- clearing the query brings the folder back
@@ -703,8 +698,8 @@ Every test name in the suite, by file: the fastest way to see whether something
- a filename cannot be a path
- a batch rename cannot be given a path either
- undoing a rename puts the old name back
- undoing a cut-paste moves the item back
- a copy is not undoable, because nothing was changed
- undoing a cut to a chosen folder moves the item back
- a copy to a chosen folder is not undoable, because nothing was changed
- the undo handle is cleared once it has been used
- a shared file is saved into the folder the user chose
- a shared file never overwrites one already in the folder
@@ -717,7 +712,7 @@ Every test name in the suite, by file: the fastest way to see whether something
### `ui/browser/SelectionBarTest.kt` (3)
- the destination verbs live in the overflow menu
- the destination verbs are on the bar
- several files are offered a rename and not the details
- a single file keeps both
+2 -2
View File
@@ -309,7 +309,7 @@ requested feature in the market leader, and the permission line is a claim it ca
| Duplicate finder | **No** | Explicitly requested, with an offer to pay. Pure local computation over a listing we can already do |
| Batch rename, including continuing an existing numbering sequence | **No** | **Closed in M14.** Several files are renamed to one name with a number after each, and the numbering continues the folder's own series, so the "Ice (3), Ice (4)" wish from the top complainant is what the dialog now defaults to |
| Bookmarks | **No** | **Closed in M15.** A star on any folder puts it in **Favourites** on the home screen, above the libraries; a folder that has gone is kept and marked rather than dropped |
| "Copy again" / "Return to source folder" after a paste | **No** | **Closed as superseded.** Both exist because their flow makes you leave the source folder to paste; [ROADMAP](ROADMAP.md) specifies **Copy to… / Move to… (M16)** instead, which never leaves the source — so the selection is still there for the next destination and there is no "back to source" to offer |
| "Copy again" / "Return to source folder" after a paste | **No** | **Closed as superseded.** Both exist because their flow makes you leave the source folder to paste; [ROADMAP](ROADMAP.md) specifies **Copy to… / Cut to… (M16)** instead, which never leaves the source — so the selection is still there for the next destination and there is no "back to source" to offer |
| New-file dot after an operation | **No** | Their 3.6.5. Cheap, and it answers "what did that 4 GB copy just do?" |
| Date-format setting | **No** | We deliberately leave the timestamp pattern unlocalised (README); a *user setting* is a different thing |
| Music-player engine switch, video gesture toggle | **No** | Deep settings; low priority for a first release |
@@ -357,7 +357,7 @@ In the ROADMAP's own vocabulary (💡 = candidate, proposed, not scheduled; ✅
Ice (2)" case that the top complainant names.
4. ✅ **Bookmarks** — shipped as **M15**. ~~💡 "Return to source folder" and "Copy again" after a
paste remain~~ — **closed as superseded**: both are workarounds for having to leave the source folder
to paste, and **Copy to… / Move to…** ([ROADMAP](ROADMAP.md), M16) removes that constraint, so the
to paste, and **Copy to… / Cut to…** ([ROADMAP](ROADMAP.md), M16) removes that constraint, so the
selection is still there for the next destination and there is no "back to source" to offer.
5. 💡 **Highlight files changed by an operation.** Their 3.6.5; answers an obvious question.
6. **Thumbnail hardening before the next release**: register an explicit Coil `ImageLoader` with a
+18 -1
View File
@@ -64,7 +64,7 @@ track to report back.
| Predictive back | **Correct.** `BACK` from inside a folder returns to the root and the activity stays resumed, so the `BackHandler` composed after the overlay branch works under the `OnBackInvoked` dispatcher too. |
| Permission request | **Broke, fixed.** On the shipped build Android 13+ was asked for nothing at all; see below. |
| The progress notification | **Fixed, then verified.** After the fix, a real 220 MB copy posts notification `1001` on channel `file-operations` with `ONGOING_EVENT\|NO_CLEAR\|FOREGROUND_SERVICE` and `category=progress`, then removes it and stops the service when the copy finishes. Before the fix the app's notification importance was `NONE`. |
| Copy to completion | The staged copy landed at `/sdcard/bigfile.bin`, byte-count identical, via the overflow menu's "Paste here". |
| Copy to completion | The staged copy landed at `/sdcard/bigfile.bin`, byte-count identical, via the then-current "Paste here" (the clipboard flow that has since become Copy to… / Cut to…). |
| Compress and extract from the UI | **Found a bug, fixed.** Long-pressing a folder and choosing "Compress to ZIP" produced a `tocompress.zip` that the host's `unzip` read back with the right relative paths and contents. Selecting that `.zip` then exposed the selection bar clipping its own actions — see below. |
| One archive of **every** supported format | **Found a bug, fixed.** A real `.zip`, `.7z`, `.tar`, `.tar.gz`, `.tar.bz2`, `.txt.xz`, `.txt.gz` and `.txt.bz2` were built on the host and all eight extracted through the UI. Each landed with the right entry names and byte-for-byte content — except `.tar.bz2`, which produced a bare `.tar`, recorded below. |
| Long-press from adb | `input swipe x y x y 700` on a single point *did* open the selection bar and reach Copy. The same gesture has been flaky on the MIUI phone, so it still deserves a manual pass. |
@@ -342,6 +342,23 @@ ran inside the search's own job, which is replaced on every letter) and the next
first folder, so the row read a fresh, small number every time. The walk finished on the last sample and
stamped the volume, which is what makes the *next* search cheap instead of another walk.
## The Copy to… / Cut to… session
The selection bar's clipboard was replaced by **Copy to…** and **Cut to…**, both opening the destination
picker. Driven on the Xiaomi phone (release build, Android 12), against `AADemo`:
| What | Result |
|---|---|
| The bar | **Copy to…** and **Cut to…** only — no Copy/Move labels, and no destination items in its overflow. |
| Copy to… | `Source` → picker (`Internal storage → AADemo → Target`) → **Copy here**: 120 × 16 MB copied; **Copying files** in the shade; completion **Copied 121 items to Target** with **Show**. |
| Cut to… | `file001.bin` → the same picker, titled **Cut to…** with **Cut here**: moved to `Target`; the source count fell from 120 to 119; the selection cleared and **Undo** was offered. |
| A name in the way | Cutting `Source` into a `Target` that already held one raised **Items already exist here**, with Replace / Skip / Cancel / Keep both; Cancel moved nothing. |
| Paste | The top-bar overflow lists Find duplicates, Storage usage, Trash and Refresh — no **Paste here**. |
The copy was recorded as the foreground-service video ([FGS_VIDEO](FGS_VIDEO.md)). Not repeated here:
the SAF-mode picker (the same dialog, but the granted-tree root was not driven), tablet/landscape layout,
and a cut interrupted mid-batch.
## Not verified, and why
- **Long-press multi-select via adb: it works, but not every time.** `input swipe x y x y 900`
+148
View File
@@ -0,0 +1,148 @@
# The foreground-service video
The Play Console's foreground-service declaration for `FOREGROUND_SERVICE_DATA_SYNC` requires a video
of the user *triggering* the local import/export, not just a description. This is that video, and the
record of how it was made. The All files access declaration has its own video and page:
[PERMISSION_VIDEO](PERMISSION_VIDEO.md).
## The file
| file | length | what it is |
|---|---|---|
| `store-assets/video/fgs-import-export.mp4` | **16.1 s** | The submission copy: 1080×2400, H.264, **no audio**, English captions burned in |
| `store-assets/video/fgs-import-export-uncaptioned.mp4` | 18.8 s | The same cut without captions, for a voice-over |
| `store-assets/video/fgs-import-export.srt` | — | The five captions and their timings |
**The file is not a link.** Upload it to YouTube **Unlisted**, or Drive shared with "anyone with the
link", and paste that URL into the foreground-service declaration. A private upload cannot be
reviewed.
## What it shows
| time | on screen | what it proves |
|---|---|---|
| 0:00 | `AADemo`, with `Source` selected and **Copy to…** in the action bar | The user starts a local import/export |
| 0:02 | The **Copy to…** picker: `Internal storage`, then `AADemo` | The destination is chosen locally, without leaving the source |
| 0:06 | The picker on `Target`, then **Copy here** | The user triggers the local copy |
| 0:10 | The notification shade: **Copying files** with a moving progress bar | The `dataSync` foreground service is doing the work and reporting it |
| 0:14 | `AADemo` with the snackbar **Copied 121 items to Target** and **Show** | The operation completed at the chosen destination |
The captions, in order:
1. *Copy a 1.8 GB folder with Copy to…*
2. *Pick Internal storage, then AADemo*
3. *Choose Target, then Copy here*
4. *The foreground service reports progress*
5. *Done: Copied 121 items to Target*
## What was cut, and why
The raw take was **41.0 s**; the published copy is three pieces of it:
| kept | what it is |
|---|---|
| 0–9.5 s | Select `Source`, **Copy to…**, pick `Internal storage → AADemo → Target`, **Copy here** |
| 21–25.5 s | The shade with **Copying files** and its progress bar |
| 26–31 s | The completed folder and the **Copied 121 items to Target** snackbar |
The two gaps are elapsed time, not evidence: the wait between **Copy here** and the notification
appearing, and the wait between the shade closing and the listing refreshing. **The app's target
listing stays empty until the copy finishes and then refreshes itself**, so the empty frames are the
operation in progress, not a failure. The notification and the result are from the same take.
Nothing else is edited. No home screen, launcher or library view appears — the recording starts inside
`AADemo`. The shade was cleared of the phone's weather and Play cards before the take; what remains
besides the app's notification is Android's generic USB debugging/transfer pair. The quick-settings
panel shows only icons, battery and data totals; the Wi-Fi name exists in the accessibility tree but
is not drawn on screen.
Every filename is synthetic: the source is `AADemo/Source/file001.bin` … `file120.bin`, made from
`/dev/zero`, and the destination is `AADemo/Target`.
## Re-shooting it
Create the fixture first — 120 files of 16 MB, so the copy lasts long enough to read the notification:
```bash
adb shell 'rm -rf /sdcard/AADemo/Target; mkdir -p /sdcard/AADemo/Source /sdcard/AADemo/Target
for i in $(seq -w 1 120); do
dd if=/dev/zero of=/sdcard/AADemo/Source/file$i.bin bs=1M count=16 2>/dev/null
done'
```
Clear the notification shade before recording: open it, tap **Clear all**, and check with
`adb shell cmd notification list`. The phone's own weather, Play and messaging cards must not appear
in a video that will be published; USB debugging/transfer cards are generic and may stay.
Open the app on **Internal storage → AADemo**, long-press `Source`, and verify the bar says
**1 item** with **Copy to…** before recording. Then:
```bash
adb shell rm -f /sdcard/fgs.mp4
adb shell screenrecord --size 1080x2400 --bit-rate 8000000 --time-limit 55 /sdcard/fgs.mp4 &
sleep 1.5
adb shell input tap 231 2155 # Copy to… in the selection bar
sleep 2
adb shell input tap 540 1148 # Internal storage in the picker
sleep 2
adb shell input tap 540 994 # AADemo
sleep 2
adb shell input tap 540 1302 # Target
sleep 2
adb shell input tap 740 1396 # Copy here
# The notification exists only after Copy here. Wait for it, or the shade shows only USB cards.
for i in $(seq 1 16); do
adb shell cmd notification list | grep -q 'de.softwareapp_hb.filemanager' && break
sleep 0.5
done
adb shell cmd statusbar expand-notifications
sleep 6 # the card can rank below the USB pair for the first second
adb shell cmd statusbar collapse
sleep 18 # the copy must finish and the listing refresh
adb shell pkill -INT screenrecord
adb pull /sdcard/fgs.mp4
```
Cut the two waits, keeping the trigger, the notification and the result. Use `-ss`/`-t` per segment
rather than a filter graph: the phone records variable-frame video, and a `trim` concat came out 6 s
short on this take.
```bash
ffmpeg -y -ss 0 -t 9.5 -i fgs.mp4 -an -c:v libx264 -crf 20 -pix_fmt yuv420p seg-a.mp4
ffmpeg -y -ss 21 -t 4.5 -i fgs.mp4 -an -c:v libx264 -crf 20 -pix_fmt yuv420p seg-b.mp4
ffmpeg -y -ss 26 -t 5 -i fgs.mp4 -an -c:v libx264 -crf 20 -pix_fmt yuv420p seg-c.mp4
printf "file 'seg-a.mp4'\nfile 'seg-b.mp4'\nfile 'seg-c.mp4'\n" > segments.txt
ffmpeg -y -f concat -safe 0 -i segments.txt -c copy fgs-cut.mp4
```
The times are this take's; check the frames before reusing them. The published file is 16.1 s after
the caption pass, because the last segment is shorter than its nominal five seconds.
Three traps cost takes here:
- **The picker recentres as the trail grows.** Its rows and its **Copy here** button move with each
level, so map each screen with `adb shell uiautomator dump`; the coordinates above are this phone's
1080×2400 layout, not a scale factor.
- **Never run `assembleRelease` and `adb install` in one parallel batch.** That race installed the
previous APK, and the bar still said **Copy / Move** even though the new strings were in the built
APK. Install sequentially, then check the phone:
`aapt2 dump resources <installed.apk> | grep browser_action_cut_to`.
- **Open the shade only once the notification exists, and hold it.** Opening it straight after
**Copy here** can show only Android's USB cards, and even when the app's card exists it can rank
below them for the first second. The `cmd notification list` loop plus the 6 s hold is what made
**Copying files** readable.
Also expect the target listing to stay **empty** until the copy completes and the ViewModel reloads
it. That is the operation still running, not a missed **Copy here**; `du -sh /sdcard/AADemo/Target`
is the independent check.
The captions are five PNG overlays at **y = 1900**, not the 2130 used by the all-files video: the
selection bar sits at 2133–2177 on this phone, and a caption there hides the **Copy to…** button —
the very action the video exists to show.
## Uploading it
Upload `store-assets/video/fgs-import-export.mp4` to YouTube **Unlisted** or Drive with link sharing,
and paste the URL into the **foreground-service** declaration. This is a different field from the
All files access video: the permission video shows browsing a whole volume, this one shows the local
copy that the `dataSync` service keeps alive.
+143
View File
@@ -0,0 +1,143 @@
# The permission-use video
The Permissions Declaration Form asks for a link to a short video that shows
`MANAGE_EXTERNAL_STORAGE` being used — 30 seconds or fewer, with a voice-over or captions where the
UI does not make the use obvious. This file is the record of the video that answers it, and the
instructions for making another.
## The file
| file | length | what it is |
|---|---|---|
| `store-assets/video/permission-use.mp4` | **19.7 s** | The submission copy: 1080×2400, H.264, **no audio**, English captions burned in. The home-screen segment is deliberately cut (below) |
| `store-assets/video/permission-use-uncaptioned.mp4` | 19.7 s | The same cut without captions, for a voice-over instead |
| `store-assets/video/permission-use.srt` | — | The caption text and timings, for a re-upload or translation |
**The file is not a link.** Play asks for a URL, so upload the MP4 — YouTube **Unlisted**, or Google
Drive shared with "anyone with the link" — and paste that URL into the form. A private video or a
sign-in-gated Drive link cannot be reviewed. Unlisted is enough; the video does not need to be
public or searchable.
## What it shows
| time | on screen | what it proves |
|---|---|---|
| 0:00 | The app's **Choose a folder** prompt, with **Grant full access** | The app asks for the permission rather than assuming it |
| 0:01–0:08 | Android's **All files access** screen; the toggle is off, then on | The user grants it through Android's own UI, not an in-app shortcut |
| 0:08–0:12 | *(after a deliberate cut)* Internal storage, then the **AADemo** folder | The permission is what makes a whole-volume listing possible |
| 0:12–0:14 | Documents: `budget.csv`, `itinerary.md`, `offsite-notes.txt`, `quarterly-report.pdf`, `service-agreement.docx` | The use is not media: these are files `MediaStore` does not manage |
| 0:14–0:15 | **New folder** dialog | A write is about to be attempted |
| 0:15–0:19 | **New folder** appears with the change dot; snackbar **Folder created** | The same permission is used to write, not only to read |
**The cut at 0:08 is a privacy redaction, not an edit to the evidence.** The raw take returns to the
app's home screen between the grant and the folder listing, and that screen shows the phone's own
library counts — **6 238 images and 20 248 documents**. [STORE_LISTING](STORE_LISTING.md) forbids
publishing those counts, because they describe the owner's device rather than the app. The published
video removes the home-screen segment and resumes on the internal-storage listing, which is the
first frame that proves the grant took effect. The uncaptioned file is cut at the same two points,
so both copies tell the same story.
The captions, in order:
1. *Plain Files needs All files access*
2. *Android asks to allow all-file management*
3. *Switching on All files access*
4. *Granted: browsing internal storage*
5. *Documents: CSV, MD, TXT, PDF, DOCX*
6. *Writable too: a new folder is created*
## Why the system UI is German
The test phone (Xiaomi M2101K7AG) runs MIUI in German; the app itself is English. Changing the phone's
language to flatter a recording would not change what the permission does, and the two system strings
that matter are translated by the captions: *Zugriff auf alle Dateien* ("All files access") and
*Zugriff zum Verwalten aller Dateien zulassen* ("Allow access to manage all files"). The reviewer sees
the toggle move and the app change state, which is the evidence; the language is incidental.
## Privacy: what is not in the video
- The library is **generated** by `tools/make-demo-library.py`, not taken from the phone. It was
copied to `/sdcard/AADemo` so it sorts first and the recording never has to open `Download`, whose
listing on this device holds the owner's real PDFs.
- Every filename on screen — `budget.csv`, `itinerary.md`, `quarterly-report.pdf`, `AADemo` — is
synthetic. The published cut removes the home screen entirely, because its library counts
(**6 238 images, 20 248 documents**) are the owner's real totals; the uncaptioned file is cut at the
same points. What remains shows synthetic names and Android's own screens.
- Frames were inspected with a contact sheet before and after the cut, and the status bar holds
nothing but the clock, signal, battery and the screen-record indicator.
## Re-shooting it
The take was made on the release build, because that is the artefact the declaration is about:
```bash
./gradlew :app:assembleRelease
adb install -r app/build/outputs/apk/release/app-release.apk
adb shell cp -r /sdcard/Download/PlainFiles-Demo /sdcard/AADemo # only if absent
adb shell appops set --uid de.softwareapp_hb.filemanager MANAGE_EXTERNAL_STORAGE deny
adb shell am force-stop de.softwareapp_hb.filemanager
adb shell am start -n de.softwareapp_hb.filemanager/.MainActivity
```
⚠️ **The `--uid` is the whole trap.** After Android's Settings screen grants the permission, a
package-level `appops set de.softwareapp_hb.filemanager MANAGE_EXTERNAL_STORAGE deny` leaves the
**UID mode** at `allow`, the app keeps `isExternalStorageManager() == true`, and no prompt appears.
The revoke only works with `--uid`, and `appops get` shows both lines so the state can be checked
before recording.
Then, with the prompt verified on screen, record and drive it:
```bash
adb shell rm -f /sdcard/permission-use.mp4
adb shell screenrecord --size 1080x2400 --bit-rate 8000000 --time-limit 30 /sdcard/permission-use.mp4 &
sleep 1
adb shell input tap 540 1358 # Grant full access
sleep 2.5
# If the runtime storage dialog appears, tap ERLAUBEN at (540,1321). It does not when
# READ_EXTERNAL_STORAGE is already granted, which is the normal case on this phone.
sleep 2.5
adb shell input tap 931 526 # All files access toggle
sleep 2
adb shell input keyevent KEYCODE_BACK
sleep 2
adb shell input tap 540 1600 # Internal storage
sleep 2
adb shell input tap 540 644 # AADemo
sleep 2
adb shell input tap 540 644 # Documents
sleep 2
adb shell input tap 959 2146 # New folder (FAB)
sleep 1.5
adb shell input tap 824 1368 # Create; the name is prefilled, so no keyboard appears
sleep 4
adb shell pkill -INT screenrecord
adb pull /sdcard/permission-use.mp4
```
Then cut out the home screen. In this take the last Settings frame is at **8.25 s** and the first
internal-storage frame is at **10.5 s**; re-check those two frames before reusing the numbers, because
the exact times depend on how fast the taps landed:
```bash
ffmpeg -y -i permission-use.mp4 -filter_complex \
"[0:v]trim=0:8.25,setpts=PTS-STARTPTS[a];[0:v]trim=10.5,setpts=PTS-STARTPTS[b];[a][b]concat=n=2:v=1[v]" \
-map "[v]" -c:v libx264 -crf 20 -pix_fmt yuv420p -an permission-use-cut.mp4
```
Do not try to record this on the AVD. Under software emulation `screenrecord` captured **one frame in
three seconds** — a three-second test produced a 1-frame, duration-less file — so the clean emulator
cannot produce video. The phone records properly; the emulator is only useful for checking the demo
library and the permission screens.
Two details are deliberate:
- **Never tap the name field.** On this MIUI build it raises the keyboard, the dialog shifts up, and
the next tap lands on the keyboard instead of **Create** — the first attempt created the folder but
ended on an empty screen. The prefilled *New folder* is enough to show a write.
- **The coordinates assume 1080×2400 at 440 dpi** (the Xiaomi phone). On another device, map each
screen with `adb shell uiautomator dump` and use the bounds rather than scaling these.
The captions were burned in from six transparent PNG overlays with `ffmpeg overlay` (Pillow, DejaVu
Sans Bold 40 px, black 80 % box, bottom-centred above the snackbar). The text and timings are in
`store-assets/video/permission-use.srt`, so a re-upload can carry the same captions without burning
them in.
+64
View File
@@ -152,6 +152,66 @@ This is the step that can block a file manager, and the one to get right.
- [ ] Keep the permission set honest: declaring a permission the app does not use is itself
a policy violation.
**The declaration answer (490 / 500 characters, measured):**
```
Plain Files' core purpose is browsing and managing every file and folder on internal storage, SD cards and USB drives: documents, archives, APKs, hidden files and folders created by other apps. The Storage Access Framework grants one user-picked tree at a time and cannot enumerate volumes or present a whole-device hierarchy. MediaStore exposes indexed media collections, not arbitrary files or folder trees. SAF remains a fallback for a chosen folder, but cannot deliver the core purpose.
```
This is a **functional** argument, which is the only kind the form accepts — Google's own wording
says improving performance is not an acceptable reason, so speed is not mentioned. Each claim is true
of this build: `data/SafSource` already provides the folder-tree fallback, and the app's only
`MediaStore` use is the best-effort delete request (section 5's permission audit), so neither API is
being dismissed as unnecessary. What they cannot do is *enumerate every volume*, *present one
hierarchy spanning internal storage and removable media*, or *manage arbitrary non-media files and
folders* — which is what "file manager" means, and why the listing copy leads with it.
If a future form allows fewer characters, cut the last sentence first: the fallback is a point of
honesty, not the justification.
- [ ] Upload `store-assets/video/permission-use.mp4` (**19.7 s**, captions burned in) to YouTube
**Unlisted** or Drive shared with anyone who has the link, then paste that URL into the form's
video field. The repository file is not a link, and a private video cannot be reviewed. What it
shows, why the system UI is German, and how to re-shoot it: [PERMISSION_VIDEO](PERMISSION_VIDEO.md).
### The foreground-service declaration (`dataSync`)
`FileOpService` is a **`dataSync`** foreground service: it keeps a copy, move, delete (into the trash),
compress or extract alive while the user is in another app, and mirrors the engine's progress into an
ongoing, silent notification. It runs no network code and the app has no `INTERNET` permission. Play
asks about this separately from All files access.
- **Use case: Local processing → Importing, exporting.** Play's own chart describes the use case as
*"Includes migration of files from SD card. Show the user manually triggering an import or export
of files locally (for example, as moving files from an SD card)"* — which is what **Copy to…** and
**Cut to…** do. Do **not** tick network processing, backing up/restoring, media
transcoding or "Other tasks": every `OperationKind` is local — `COPY`, `MOVE`, `DELETE`, `COMPRESS`,
`EXTRACT` — and none of them touches a network.
- **Functionality description (482 / 500 characters, measured):**
```
Plain Files is a file manager. Its dataSync service runs user-initiated local file operations: copying and moving files and folders between folders, internal storage, SD cards and USB drives; deleting into a 24-hour trash; creating ZIPs; extracting ZIP, TAR, GZ, BZ2, XZ and 7z archives. It keeps a long operation alive while the user switches apps and posts an ongoing, silent progress notification until the work ends. All operations are local; the app has no INTERNET permission.
```
- **If the task is deferred** (*"does not start immediately"*): *"If deferred, a copy, move, delete,
compress or extract the user just confirmed would not start while Plain Files is in the background:
no progress notification and no visible change until the app returns. A large operation could look
as if it had silently failed, and the user might start it again."*
- **If the task is interrupted** (*"paused and/or restarted"*): *"If interrupted, the work stops.
Items already completed remain, but a file being copied or extracted can be left partly written at
the destination, and the user has to start the operation again. Nothing is overwritten without
asking, and deletes are staged in the 24-hour trash, so completed deletes remain recoverable."*
- [ ] **Upload the foreground-service video.** `store-assets/video/fgs-import-export.mp4` (**16.1 s**,
captions burned in) to YouTube **Unlisted** or Drive with link sharing, then paste that URL into
the foreground-service declaration. It shows the selection, **Copy to…**, the destination
picker (`Internal storage → AADemo → Target`), **Copy here**, the **Copying files**
notification with its progress bar, and **Copied 121 items to Target**. It is a
different field from the All files access video. What was cut, the privacy checks, and how to
re-shoot it: [FGS_VIDEO](FGS_VIDEO.md).
**Verify the shipped permission set** after every release build:
```bash
@@ -197,6 +257,10 @@ Full copy and the generated graphics land in **M10** (`docs/STORE_LISTING.md`).
fields needed: app name, short description, full description, app icon 512×512, feature
graphic 1024×500, and the screenshots.
The per-release **What's new** field is separate from the listing and is capped at **500 characters**:
its copy, measured, is in [RELEASE_NOTES](RELEASE_NOTES.md), together with the longer announcement
for a website or GitHub release.
- [ ] Upload the screenshots from `store-assets/screenshots/`: **phone** 1080×2160 (8),
**7-inch tablet** 1200×1920 (4), **10-inch tablet** 2560×1600 (4). Play wants 4+ per
large-screen form factor. All three sets clear its rules — 24-bit PNG with no alpha,
+146
View File
@@ -0,0 +1,146 @@
# Release notes
The copy a buyer reads *before* installing, as opposed to [CHANGELOG](../CHANGELOG.md), which is the
reasoning for whoever maintains the app. Two lengths live here:
- **Play Console → What's new** — plain text, **500 characters per language**, no Markdown and no
bullets (Play renders neither), measured rather than estimated.
- **The longer announcement** — for a website, a forum post or a GitHub release, where the limit is
the reader's patience rather than a Console field.
The source of truth for *what* changed is the changelog, and the source of truth for *what the app
claims* is the [README](../README.md) and [STORE_LISTING](STORE_LISTING.md). This file only chooses
which of those facts a new user should hear first.
## Writing the next one
1. **Version.** `versionName` and `versionCode` are in `app/build.gradle.kts`; the latter must be
higher than every previous upload. The first release is `1.0.0` / `1`.
2. **Changelog first.** Move the entries out of `## [Unreleased]` into a
`## [1.0.0] - YYYY-MM-DD` heading, so this file and the changelog cannot describe different
builds.
3. **Then the Play field.** Say what a user can now do that they could not before — never what the
code did. A first release describes the app instead of a diff.
4. **Measure it.** Play counts characters, line breaks included:
```bash
python3 -c "print(len(open('/tmp/whats-new.txt').read().strip()))"
```
5. **Quote nothing that a device has not shown.** A limitation belongs in the announcement only if
it is already in the README's *Known limitations*; if it is not, the README is what needs fixing.
---
## 1.0.0 — first release
### Play Console → What's new (500 characters max)
```
Plain Files is here: a file manager with no ads, no account and no internet permission, so nothing leaves your device.
Browse internal storage, SD cards and USB drives. Copy, move, rename and delete files; undo a delete, rename or move; search everywhere; find duplicates; unpack ZIP, TAR, GZ, BZ2, XZ and 7z; star the folders you use; and read images, video, PDFs and text inside the app.
One purchase, every feature. No tracking, no subscription.
```
**Measured: 450 characters** (including the two blank lines between paragraphs). The remaining
headroom is deliberate: it leaves room for a sentence about a fix without rewriting the whole field.
Why this shape: the first two sentences are the claim no competitor in the survey makes — no ads and
**no `INTERNET` permission** — and the middle one is the proof that it is still a file manager. The
verbs are the ones people use ("copy, move, rename, delete"), not the app's internal names. Nothing
here is a superlative, an emoji, or the word *free*: the app is paid, and a headline implying
otherwise is both misleading and against Play's editorial policy.
### The longer announcement
> Plain Files 1.0.0 is available for Android 8.0 and later. One purchase, no subscription, no ads,
> and no way for the app to send anything off the device — because it does not hold the network
> permission at all.
#### What it does
**Browsing.** Internal storage, SD cards and USB drives side by side. List or grid, sorted by
name — `file2` before `file10` — size, date or type; hidden files on request; breadcrumbs; and a
search that either stays in the folder you are in or looks everywhere through an on-device index
which says how current its answer is.
**Moving files around.** Copy, move, rename and delete one item or many. **Copy to…** and **Cut
to…** open a folder picker — volumes first, then one level at a time — and start the transfer into
that folder without taking you out of the one you are standing in. A finished copy says
*Copied to folder* and offers **Show**. A name that already exists asks before overwriting, and a
batch that cannot succeed is refused as a whole rather than performed until it
hits the problem. The rows an operation produced carry a dot until you next open that folder, so
"what did that 4 GB copy do?" has an answer even when the destination was elsewhere.
**Undo, and a trash that explains itself.** A delete is a move into a hidden `.plainfiles-trash`
folder on the same volume, kept for **24 hours**; the Trash screen states that window, offers
**Empty trash** behind one question, and sweeps expired batches when you open it. Rename and move
offer undo as well.
**Renaming a batch.** Select several files and Rename opens a pattern rather than the single-file
dialog: one name, the number to start at, and a live preview of the names it will produce. The
numbering **continues the folder's own series** — `Holiday (1)` and `Holiday (2)` already there make
the next batch start at 3 — because a batch rename that always starts at 1 is useless the second
time it is used. A name in the way blocks the batch and is named as it is typed.
**Finding things.** The duplicate finder compares size, then the head of every candidate, then the
survivors in full — never a name or a date. The storage-usage view measures every folder and ranks
it largest first, so the folder eating the card is the one at the top.
**Looking at files.** Image, text, PDF, media and archive viewers, and an APK's own details read
without installing it. Thumbnails show the picture, and a **video shows a frame of itself** rather
than a film icon. An archive can be read without extracting it first, with entry names checked
against zip-slip.
**Archives.** Create ZIP; extract ZIP, TAR, TAR.GZ, TAR.BZ2, TAR.XZ, GZ, BZ2, XZ and 7z. When
compressing, you choose the name and whether to compress at all: for copying a collection to a
computer, storing the files as they are takes one pass and is still an ordinary archive.
**Working with other apps.** Plain Files can receive a share from anywhere and appear in another
app's file chooser. Neither costs a permission.
**Tablets and large windows.** At expanded width the screen splits into two panes: the folder list
on the left, and the contents — or a preview and the details — of the folder or file you pick on the
right.
**Shortcuts.** Long-press the app icon for **Images**, **Recent** and **Trash**.
#### What it deliberately does not do
- **No cloud storage, network shares, FTP/SFTP/WebDAV or web server.** Every one of those needs
`INTERNET`, which is the single permission this app refuses to hold. That is the product, not a
gap in the schedule.
- **RAR is not supported**, because it needs native code this app does not ship — and it says so
rather than failing with a strange error. 7z can be read but not created.
- **Extraction does not restore timestamps or permissions**, and archive passwords are not
supported.
- **Cancelling happens between entries**, so one very large file finishes before a stop is honoured.
- **English is the only language so far.** Every string is in `strings.xml`, so a translation is a
file rather than a refactor.
- **Android TV is specified but not shipped.** Its acceptance needs a TV device pass this machine
cannot provide, and a half-tested TV build reviews worse than none.
- **A library is not restored across process death.** Images or Recent returns to the root screen
after Android kills the process, because a library has no path to persist.
#### Privacy, in one paragraph
The app declares no `INTERNET` permission, contains no advertising or analytics SDK, and has no
account or sign-in. It keeps three things on the device — an index of files for search, an index of
staged deletes for the trash, and the list of starred folders — and none of them leaves it. The
permission set and why "All files access" is the one sensitive declaration are in the
[store listing](STORE_LISTING.md); the policy text is [PRIVACY.md](../PRIVACY.md).
#### Price
**€4.49**, with a **€2.29 launch price for the first 14 days**. One purchase, every feature; no
subscription and nothing to buy inside the app. There is no Billing client in the build — the price
lives on the listing — which is part of how "nothing leaves the device" stays true of the shipped
artefact rather than only of the source.
#### What comes next
Android TV is specified and waits for a device; the post-1.0 queue and the deliberate deferrals are
in [ROADMAP](ROADMAP.md). What will not change is the permission set: features arrive without a new
permission, or they do not arrive.
+19 -19
View File
@@ -1,8 +1,8 @@
# Roadmap
File Manager is built against a fixed milestone plan (**M0–M15**). This file is the
single source of truth for what is done and what remains. **M16** (Copy to… / Move to…) has since been
built and is specified below; the queue records what is left.
File Manager is built against a fixed milestone plan. **M0–M20 are built**; **M21** (Android TV) is
specified and deliberately waits for a device. This file is the single source of truth for what is
done and what remains, and the queue records what is left.
Legend: ✅ done · 🚧 in progress · ⏳ not started · 💡 candidate (proposed, not scheduled)
@@ -26,7 +26,7 @@ Legend: ✅ done · 🚧 in progress · ⏳ not started · 💡 candidate (propo
| M13 | Video thumbnails | ✅ | A video row shows **a frame of the video** instead of a film icon: images and videos take the same path through Coil, with the video request asking for a frame a second in. One dependency — `coil-video` at the Coil version already pinned, whose POM adds only coil-core/stdlib/core-ktx — the platform's own `MediaMetadataRetriever` behind it, **no new permission** (no `READ_MEDIA_VIDEO`), and the decoder registered **explicitly** against an `ImageLoader` in `FileManagerApplication` — because R8 strips `coil-video`'s ServiceLoader entry from a release build, which would otherwise have left frames decoding in debug and quietly falling back to icons for real users. A decode that fails settles on the icon rather than an empty square. Verified on the phone against two purpose-made clips and a real video of the device's own, with the demo library's stand-ins falling back as intended, and **re-verified on the release APK**. **324 JVM tests** |
| M14 | Batch rename with sequence continuation | ✅ | Selecting more than one file and choosing Rename opens a **pattern** dialog: a name, a start number, and a live preview of the names it will produce. `core/BatchRename` plans the whole batch before a single file moves and returns one of three answers — **Ready**, **Blocked** (naming the target the folder already holds) or **NothingToDo** — with the deliberate absence of a fourth: a batch that renamed nine of twelve and stopped would leave the user to work out which nine. The numbering **continues the folder's own series** `nextNumber` from the highest `base (n)` it finds, which is the market survey's most-helpful complaint answered by name; the extension is kept per file, the series is counted across extensions, and continuing beats filling the first gap. `SelectionBar` now offers Rename to any selection (one file keeps the name dialog, several get the pattern one), and the batch's renames are **one** `Undo.Relocate` step. The same commit hardens the single rename: `core/FileNames.isUsableName` refuses a name that is not one path segment, because `notes/final.txt` was being resolved as a path and **moved** the file instead of renaming it. **350 JVM tests** (26 added) |
| M15 | Favourites | ✅ | A star in the app bar of any folder, and a **Favourites** section on the home screen above the libraries — absent while empty, so a first-time user still meets the libraries first. `data/BookmarkStore` + `SqliteBookmarkStore` keep one path per row in their own database: a **reference, never a copy**, so the list costs one query and no filesystem work. `BrowserUiState.Bookmark` carries an `exists` flag, and a folder that has gone is **kept and marked** rather than deleted — an unmounted card and a deleted folder are the same thing from here — with opening re-checked at that moment so the answer is a message instead of an empty listing. The row's filled star is the removal (the mark that says "favourite" is the thing you tap to stop it being one), there is no star in a library or on the root screen, and no `Undo` for a bookmark because that type is "the last change to the filesystem" and a favourite is not one. **371 JVM tests** (16 added) |
| M16 | Copy to… / Move to… | ✅ | A destination picker behind the selection bar's overflow — volumes, then folders one level at a time, with Up and the trail above them — that copies or moves **without leaving the folder you are in**. The selection survives a copy, so a second destination is two taps; a move clears it. Conflicts ask what a paste asks, naming the picked folder; a copy answers "Copied to *folder*" with **Show**. Detailed below |
| M16 | Copy to… / Cut to… | ✅ | A destination picker behind the selection bar's **Copy to…** and **Cut to…** actions — volumes, then folders one level at a time, with Up and the trail above them — that copies or moves **without leaving the folder you are in**. The selection survives a copy, so a second destination is two taps; a cut clears it. Conflicts ask before overwriting, naming the picked folder; a copy answers "Copied to *folder*" with **Show**. Detailed below |
| M17 | The mark of a change | ✅ | A dot on the rows an operation produced, spent by the next read of that folder. In memory, per folder: no timer, no watcher, no badge. `BrowserUiState.changed` + `markChanged` on every operation that creates something; the dot is drawn by `MarkOfChange` in both list and grid, with a content description TalkBack reads. **7 tests** (4 view model, 3 Compose) |
| M18 | Store-only archives | ✅ | Compressing asks two things: the name, and whether to compress. Off stores the files as they are — `Deflater.NO_COMPRESSION`, one pass — which is what a bulk copy off the phone actually wants. A `STORED` entry would need each file's size and CRC before its header, i.e. reading everything twice. **4 tests** |
| M19 | The trash says what it does | ✅ | The trash states its window ("Deleted files are kept for 24 hours") and offers **Empty trash** behind one confirmation; opening the trash sweeps expired batches, so the 24-hour retention no longer waits for the next delete to run. **4 tests** |
@@ -63,7 +63,7 @@ duplicate finder (M12), batch rename with sequence continuation (M14) and favour
The last one standing there — the post-paste **"copy again"** and **"return to source folder"** — is
**closed as superseded**, not deferred: both exist only because that app's flow makes you leave the
source folder to paste. `Copy to…` / `Move to…` (in the queue below) removes that constraint, and with it
source folder to paste. `Copy to…` / `Cut to…` (in the queue below) removes that constraint, and with it
both features: you never leave the source, so the selection is still there for the next destination, and
there is no "back to source" to offer. Keeping them would be building a workaround for a limitation we
would no longer have.
@@ -71,7 +71,7 @@ would no longer have.
## The queue after 1.0
Ordered by what it protects, not by what is fun. **Four of the five items are done** — thumbnails, the
scaling numbers (which turned into progressive listing), Copy to… / Move to…, and the CI benchmark. What is
scaling numbers (which turned into progressive listing), Copy to… / Cut to…, and the CI benchmark. What is
left is the baseline profile's *measurement*, which needs a physical API 33+ device and cannot be finished
on this machine; everything else in the list says what it produced.
@@ -96,10 +96,11 @@ deliberately not started: its acceptance needs a TV device pass this machine can
outlier; the outlier was investigated and the real fix was progressive listing (200-entry batches,
O(n+k) merge), after which 20 000 files opens in **10–16 frames** with a 32–48 max across two runs. The
whole suite at that size, and what search costs there, is in [PERFORMANCE](PERFORMANCE.md).
4. **Copy to… / Move to… (M16)** — **done**: the selection bar's overflow opens a folder picker (volumes,
then folders one level at a time, Up and the trail above them) and confirming copies or moves into the
picked folder without leaving the current one. The selection survives a copy so a second destination is
two taps; a move clears it. Conflicts ask the same question as a paste, naming the picked folder. Seven
4. **Copy to… / Cut to… (M16)** — **done**: the selection bar's **Copy to…** and **Cut to…** actions
open a folder picker (volumes, then folders one level at a time, Up and the trail above them) and
confirming copies or moves into the picked folder without leaving the current one. The selection
survives a copy so a second destination is two taps; a cut clears it. Conflicts ask before
overwriting, naming the picked folder. Seven
tests cover the verbs, the picker's walk, folders-only listing, the conflict target, cancellation, and
the selection rule. Driven on the phone for both verbs (see `EDGE_CASE_TESTING.md`), which is what caught
the picker naming internal storage by its raw name `0`. A copy into a picked folder says **"Copied to
@@ -115,24 +116,23 @@ deliberately not started: its acceptance needs a TV device pass this machine can
`frameOverrunMs` after all (P50 13.9 ms / 19.0 ms for the 1 000-file open), so `PERFORMANCE.md`'s "counts
only" finding was a property of the earlier runs, not of the device; corrected there.
### M16 — Copy to… / Move to…
### M16 — Copy to… / Cut to…
**What**: from a selection, choose a destination folder and start the copy (or move) immediately, without
**What**: from a selection, choose a destination folder and start the copy (or cut) immediately, without
leaving the folder you are in.
**Why this shape**: `BrowserViewModel.paste()` already calls `planTransfer(paths, target, policy)` with the
current folder as `target`; the engine is target-agnostic, so the operation half needs no new machinery —
`FileOpService` and the conflict prompt work regardless of what is on screen. What is missing is a
destination picker.
**Why this shape**: the transfer engine already takes an explicit target — `planTransfer(paths, target,
policy)` — and is otherwise independent of what is on screen; `FileOpService` and the conflict prompt
work regardless. What was missing was a destination picker.
**Acceptance criteria**
- Selecting files and choosing *Copy to…* opens a folder picker: folders only, one level at a time, with
Up and breadcrumbs, every root the app can see (internal and SD card), and the granted tree in SAF mode.
- Confirming copies into the chosen folder and **leaves the user where they were**, with the selection
still intact — so a second destination is two taps. `Move to…` is the same picker with `cut = true`.
- A name conflict asks the same question as a paste does, with the picked folder named in it, and resolve
applies to that folder.
still intact — so a second destination is two taps. `Cut to…` is the same picker with `cut = true`.
- A name conflict asks before overwriting, with the picked folder named in it, and resolve applies to
that folder.
- Progress belongs to the existing operation notification, not to the screen the user is on.
- After a copy, a message names the destination and offers to show it. After a move the selection is
cleared and the listing refreshed, because the rows are gone.
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
1
00:00:00,200 --> 00:00:02,800
Copy a 1.8 GB folder with Copy to…
2
00:00:02,800 --> 00:00:06,200
Pick Internal storage, then AADemo
3
00:00:06,200 --> 00:00:09,600
Choose Target, then Copy here
4
00:00:09,600 --> 00:00:14,200
The foreground service reports progress
5
00:00:14,200 --> 00:00:16,000
Done: Copied 121 items to Target
Binary file not shown.
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
1
00:00:00,200 --> 00:00:03,400
Plain Files needs All files access
2
00:00:03,400 --> 00:00:06,200
Android asks to allow all-file management
3
00:00:06,200 --> 00:00:08,250
Switching on All files access
4
00:00:08,250 --> 00:00:11,750
Granted: browsing internal storage
5
00:00:11,750 --> 00:00:13,750
Documents: CSV, MD, TXT, PDF, DOCX
6
00:00:13,750 --> 00:00:19,600
Writable too: a new folder is created