Remove dependence on "org.fdroid.fdroid" to make whitelabel clients easier
We encourage people to fork F-Droid and use it (according to the license) for their own "white label" app stores. Currently this is difficult because there are a bunch of places where "org.fdroid.fdroid" appears, and in more-important-than-they-should-be places.
The worst offender is FDroidProvider
and its subclasses. They have an AUTHORITY
which is "org.fdroid.fdroid.data"
. This is based on the package they belong to, and it is difficult to change because I think it needs to correspond to their package. This is also duplicated in the AndroidManifest.xml
which has several <provider>
elements, each specifying an android:authorities
and android:name
, e.g:
<provider
android:authorities="org.fdroid.fdroid.data.AppProvider"
android:name="org.fdroid.fdroid.data.AppProvider"
android:exported="false"/>
Other (seemingly) problematic places which wont cause a crash straight away, but likely will cause problems down the line:
- The check in
FDroidApp
for "org.fdroid.fdroid:acra". -
PackageManagerCompat
callingsetInstallerPackageName("org.fdroid.fdroid")
- The swap related stuff treats the
"org.fdroid.fdroid"
package as special, always adding it to the list, and allowing it to be sent via Bluetooth.
Non-problematic (but still worthy of refactoring) places include all of the ACTION_*
and EXTRA_*
constants which are prefixed with "org.fdroid.fdroid"
. They don't need to change, because they are just dumb strings, but it is silly to require people to fork and rename the client, but leave references to F-Droid everywhere.