Files
file-manager/app/src/main/AndroidManifest.xml
T
SoftwareApp 5d39f4b3fb Four milestones from the survey's remaining gaps
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 and no watcher. Copy,
move, compress, extract, rename (single and batch) and new folders all mark what
they made, so "what did that 4 GB copy do?" has an answer even when the copy went
to a folder the user was not looking at. The dot is drawn by MarkOfChange in the
list and the grid, with a content description, and `changed` is set by the same
state update that announces the folder.

M18 - store-only archives. Compressing now asks for the name and whether to
compress, because the survey's most enthusiastic review is a bulk copy to a
computer and that file is better stored than squeezed. Deflater.NO_COMPRESSION
keeps it one pass; a STORED entry would need size and CRC before the header,
i.e. reading every file twice.

M19 - the trash says what it does. The screen states the 24-hour window, offers
Empty trash behind one question, and opening the trash sweeps what has expired -
the window used to run only after the next delete, so an old batch could stay on
the card indefinitely. Trash.emptyAll leaves anything in that folder that is not
one of ours alone.

M20 - launcher shortcuts. Images, Recent and Trash as static shortcuts carrying
a route extra; core/ShortcutRoute answers null for anything it does not know, so
an old shortcut cannot crash a new build. Favourites was dropped from the plan:
it is a section of the home screen, not a view, so a shortcut to it would promise
something that may not be there.

M21 (Android TV) is specified in the roadmap and deliberately not started: its
acceptance needs a TV device pass this machine cannot provide.

18 new tests (427 in total). Detekt's baseline was regenerated after two
signatures gained a parameter; the diff is three findings with new signatures and
their KDoc moved above the annotations so the baseline stays readable. Verified by
the gate only so far - the device pass for these four is next, and the terminal
here has been losing command output for the last hour.
2026-10-18 00:15:03 +02:00

147 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!--
Storage access.
This app is a file manager, which Google Play lists as a permitted use of the
"All files access" special permission. The permission is declared here and must
be accompanied by a Permissions Declaration Form in the Play Console before the
release goes live (see docs/PLAY_RELEASE_CHECKLIST.md).
When the user does not grant it, the app falls back to the Storage Access
Framework (ACTION_OPEN_DOCUMENT_TREE) — see data/SafSource.
-->
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<!--
Read access on Android 12 and below, where it is the grant that carries media.
From Android 13 this role is taken over by "all files access" below, and the
READ_MEDIA_* permissions are deliberately *not* declared: the app reads through the
filesystem — Coil loads thumbnails and the viewers from a real path — and never
lists or queries MediaStore, so declaring them would mean declaring permissions
that are never requested and never used.
-->
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<!--
Needed only on Android 10 (API 29) and below to write through the legacy
storage path. Android 11+ writes go through the all-files-access route or SAF.
-->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29"
tools:ignore="ScopedStorage" />
<!--
Long file operations keep running while the app is backgrounded. `dataSync` is the
foreground-service type that matches "user-initiated data processing".
-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<!--
Android 13+: shows the operation progress notification. Optional — denying it costs
only the progress display, the operation itself still runs — but it is requested
when the storage grant is asked for, because Android will not let the user grant it
in Settings to an app that has never asked.
-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name=".FileManagerApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:enableOnBackInvokedCallback="true"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.FileManager"
tools:targetApi="33">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.FileManager">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Long-press shortcuts: Images, Recent, Trash. See res/xml/shortcuts.xml. -->
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
<!--
Receiving a share. Without these the app is not a share target at all — the
manifest had nothing but LAUNCHER, so no other app could hand it a file.
`*/*` rather than a list of types on purpose: a file manager should accept
anything the user wants to put somewhere, including types it cannot preview.
-->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<!--
Supplying a file. `GET_CONTENT` and `OPEN_DOCUMENT` are how other apps ask
for one, and `OPENABLE` is what makes the chooser list this app for a
"choose a file" prompt rather than a "choose a document" one.
`ACTION_VIEW` is deliberately absent: the app already hands files *out*
through the system chooser, and registering as a viewer as well would risk
offering Plain Files back to itself in that chooser.
-->
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.OPEN_DOCUMENT" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<!--
No copy logic lives here: it mirrors the engine's progress into an ongoing
notification and keeps the process alive during a long operation.
-->
<service
android:name=".service.FileOpService"
android:exported="false"
android:foregroundServiceType="dataSync" />
<!--
Wraps a real file in a content:// URI so another app can open or receive it
without the app ever exposing a file:// URI.
-->
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>