android / Build + lint + test (push) Successful in 3m46s
`android:usesCleartextTraffic="true"` sat on <application> as a bare opt-out of the platform's network-security default, with nothing recorded about why. It's now a res/xml/network_security_config.xml carrying the same permission and the reasoning behind it. Behaviour is unchanged. networkSecurityConfig supersedes the attribute on API 24+ and our minSdk is 26, so the attribute is removed rather than kept alongside. Cleartext stays permitted because two independent things need it, and neither can be narrowed to a domain list: - The Minstrel server's host is user-entered at runtime, and plenty of self-hosters run plain HTTP on a LAN. - UPnP/DLNA/Sonos — device-description and SOAP control URLs arrive in SSDP responses at runtime and are plain HTTP essentially always. This one wasn't in the original ticket, which only considered the server; it independently rules out the "tighten it later to RFC1918" idea, since <domain-config> matches literal hostnames, not CIDR ranges, and renderer IPs are unknowable ahead of time. Trust anchors deliberately left at the platform default. Adding <certificates src="user" /> would let self-hosters use HTTPS with a private CA — which Mihon does, and which suits this product — but it also trusts every CA on the device including a corporate MITM proxy. Raised separately rather than assumed as a default. tools:ignore="InsecureBaseConfiguration" mirrors Mihon's config and keeps lintVitalRelease quiet about a choice that is deliberate and now documented.
83 lines
4.2 KiB
XML
83 lines
4.2 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">
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
<!-- In-app self-update. REQUEST_INSTALL_PACKAGES lets us hand an APK to the
|
|
platform installer at all; UPDATE_PACKAGES_WITHOUT_USER_ACTION (API 31+)
|
|
is what lets that install happen with NO confirm dialog. The platform
|
|
grants the silent path only when the installer opts in via
|
|
SessionParams.setRequireUserAction(USER_ACTION_NOT_REQUIRED), the
|
|
installed app targets API 29+, the installer holds this permission, and
|
|
the target is the installer itself — all true here, since Minstrel is
|
|
updating Minstrel. See update/data/SelfUpdateSession.kt. -->
|
|
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
|
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
|
|
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
|
|
|
<application
|
|
android:name=".MinstrelApplication"
|
|
android:allowBackup="false"
|
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
|
android:fullBackupContent="@xml/backup_rules"
|
|
android:icon="@mipmap/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:networkSecurityConfig="@xml/network_security_config"
|
|
android:supportsRtl="true"
|
|
android:theme="@style/Theme.Minstrel"
|
|
tools:targetApi="34">
|
|
|
|
<!-- Portrait-locked until a tablet/landscape layout exists.
|
|
Current Compose screens are sized for phone-portrait;
|
|
landscape just stretches the column awkwardly. Revisit
|
|
this when a dedicated tablet layout lands. -->
|
|
<activity
|
|
android:name=".MainActivity"
|
|
android:exported="true"
|
|
android:screenOrientation="portrait"
|
|
android:theme="@style/Theme.Minstrel">
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
</activity>
|
|
|
|
<service
|
|
android:name=".player.MinstrelPlayerService"
|
|
android:exported="true"
|
|
android:foregroundServiceType="mediaPlayback">
|
|
<intent-filter>
|
|
<action android:name="androidx.media3.session.MediaSessionService" />
|
|
</intent-filter>
|
|
</service>
|
|
|
|
<!-- The FileProvider that used to live here existed solely to expose the
|
|
downloaded update APK as a content:// URI for the old ACTION_VIEW
|
|
install intent. A PackageInstaller session takes a stream instead,
|
|
so both the provider and res/xml/file_paths.xml are gone — nothing
|
|
else in the app ever used that authority. -->
|
|
|
|
<!-- On-demand WorkManager initialization: MinstrelApplication
|
|
implements Configuration.Provider and supplies the
|
|
HiltWorkerFactory. Remove the default startup-driven
|
|
initializer so WorkManager picks up our config instead of
|
|
auto-initializing with the wrong factory. lintVitalRelease
|
|
flags this as a fatal error if left in place. -->
|
|
<provider
|
|
android:name="androidx.startup.InitializationProvider"
|
|
android:authorities="${applicationId}.androidx-startup"
|
|
tools:node="merge">
|
|
<meta-data
|
|
android:name="androidx.work.WorkManagerInitializer"
|
|
android:value="androidx.startup"
|
|
tools:node="remove" />
|
|
</provider>
|
|
</application>
|
|
</manifest>
|