mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
fix(gplay): strip permissions Play Console rejects
This commit is contained in:
@@ -231,6 +231,15 @@ remote):
|
||||
- **`app/build.gradle.kts`** — the `healthchat` signing config and the
|
||||
`appicon/healthchat` dependency must survive; upstream signs release with
|
||||
the debug keystore and depends on `appicon/element`.
|
||||
- **`app/src/gplay/AndroidManifest.xml`** — HealthChat-only file that strips
|
||||
`REQUEST_INSTALL_PACKAGES` and the location permissions
|
||||
(`FOREGROUND_SERVICE_LOCATION`, `ACCESS_FINE_LOCATION`,
|
||||
`ACCESS_COARSE_LOCATION`, plus `LiveLocationSharingService`) from the Play
|
||||
build. Play Console rejects the release at edit-commit time while either is
|
||||
declared but not justified on the listing. Upstream has no `app/src/gplay/`
|
||||
manifest, so this should never conflict. If HealthChat ever ships maps
|
||||
(a MapTiler key in `BuildTimeConfig`), the location removals must come out
|
||||
first — the feature is gated on that key, not on these declarations.
|
||||
- **`plugins/src/main/kotlin/Versions.kt`** — take upstream's version when
|
||||
higher (see Versioning above).
|
||||
- **`fastlane/metadata/android/`** — HealthChat listing texts (en-US, de-DE)
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2026 Novaloop AG
|
||||
~
|
||||
~ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
~ Please see LICENSE files in the repository root for full details.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!--
|
||||
HealthChat does not want APK sideloading from chat. Upstream declares
|
||||
REQUEST_INSTALL_PACKAGES so that tapping an .apk attachment in the media
|
||||
viewer deep-links to "Install unknown apps" and hands the file to the
|
||||
system installer (see AndroidLocalMediaActions.open) — a workflow aimed at
|
||||
Element's nightly/F-Droid audience, and not one we want in a healthcare
|
||||
messenger. Play Console also rejects releases carrying this permission
|
||||
unless it is declared and justified on the listing.
|
||||
|
||||
Removing it is a configuration upstream supports: the media viewer checks
|
||||
for the permission before using it and otherwise falls through to the
|
||||
normal system open path, so .apk attachments still open, just without the
|
||||
in-app install shortcut.
|
||||
-->
|
||||
<uses-permission
|
||||
android:name="android.permission.REQUEST_INSTALL_PACKAGES"
|
||||
tools:node="remove" />
|
||||
|
||||
<!--
|
||||
HealthChat ships no location features, so it should not ask for location.
|
||||
They are already unreachable at runtime: DefaultLocationService gates the
|
||||
whole feature on BuildConfig.MAPTILER_API_KEY, and HealthChat sets no
|
||||
MapTiler key (BuildTimeConfig.SERVICES_MAPTILER_APIKEY = null, and the
|
||||
ELEMENT_ANDROID_MAPTILER_API_KEY fallback is unset in CI). The composer's
|
||||
"Share location" action and the location viewer are both hidden as a
|
||||
result, so LiveLocationSharingService can never start — only these
|
||||
declarations survive, and FOREGROUND_SERVICE_LOCATION forces a foreground
|
||||
service declaration on the Play listing for a feature we do not ship.
|
||||
|
||||
Removing the declarations changes nothing users can reach, and keeps the
|
||||
location module in the dependency graph so upstream merges stay clean.
|
||||
|
||||
The service must be named fully qualified: the library declares it
|
||||
relative to its own namespace (io.element.android.features.location.impl),
|
||||
whereas a leading dot here would resolve against the app's namespace.
|
||||
|
||||
FOREGROUND_SERVICE itself stays — the call and push modules need it.
|
||||
-->
|
||||
<uses-permission
|
||||
android:name="android.permission.FOREGROUND_SERVICE_LOCATION"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_FINE_LOCATION"
|
||||
tools:node="remove" />
|
||||
<uses-permission
|
||||
android:name="android.permission.ACCESS_COARSE_LOCATION"
|
||||
tools:node="remove" />
|
||||
|
||||
<application>
|
||||
<service
|
||||
android:name="io.element.android.features.location.impl.live.service.LiveLocationSharingService"
|
||||
tools:node="remove" />
|
||||
</application>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user