
Listen for a new intent, show a screen to the user mentioning they are about to start a swap. Make FDroid receive repo intents, then dispatch to relevant Activity. Previously manage repo always got the intents. Now FDroid does, and chooses whether to give to ManageRepos or Client connect. Not sure if it is required to do it this way or not, but it seems to work. I had a bit of an issue getting the "Welcome to F-Droid" string to fit on one line, because it was breaking on the hyphen. That is still not resolved in this commit. Still need to: * Show error messages instead of the "connect" description * Jar signing seems not to work when connecting to other repo. In order to handle returning to F-Droid after connecting (or saying no) I tagged the intent with a "handled" extra value. That way, I can ignore trying to connect to a repo if we've already handled that event. Finally, I also fixed an issue regarding downloading of signed index.jar files with an uppercase fingerprint. The fingerprint from the jar differed from that in the swap url, in that one was upper case and the other was lower case. This uses an .equalsIgnoreCase check instead. It also adds an extra guard in case the repo doesn't have a fingerprint. Although it may not even use the signed repo updater if both the pubkey and fingerprint are null, it is nice to have the extra assurance. Fixes issue #19. I also left some more TODO's around. I should put them in issues, but I'm in a bit of a hurry.
415 lines
17 KiB
XML
415 lines
17 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"
|
|
package="org.fdroid.fdroid"
|
|
android:installLocation="auto"
|
|
android:versionCode="760"
|
|
android:versionName="0.76" >
|
|
|
|
<uses-sdk
|
|
android:minSdkVersion="7"
|
|
android:targetSdkVersion="19" />
|
|
|
|
<supports-screens
|
|
android:anyDensity="true"
|
|
android:largeScreens="true"
|
|
android:normalScreens="true"
|
|
android:resizeable="true"
|
|
android:smallScreens="true"
|
|
android:xlargeScreens="true" />
|
|
|
|
<uses-feature
|
|
android:name="android.hardware.wifi"
|
|
android:required="false" />
|
|
<uses-feature
|
|
android:name="android.hardware.touchscreen"
|
|
android:required="false" />
|
|
<uses-feature
|
|
android:name="android.hardware.nfc"
|
|
android:required="false" />
|
|
<uses-feature
|
|
android:name="android.hardware.bluetooth"
|
|
android:required="false" />
|
|
|
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
|
|
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
<uses-permission android:name="android.permission.NFC" />
|
|
|
|
<!-- These permissions are only granted when F-Droid is installed as a system-app! -->
|
|
<uses-permission android:name="android.permission.INSTALL_PACKAGES"
|
|
tools:ignore="ProtectedPermissions"/>
|
|
<uses-permission android:name="android.permission.DELETE_PACKAGES"
|
|
tools:ignore="ProtectedPermissions"/>
|
|
|
|
<!-- Indicate that F-Droid may request root access (introduced by Koush's Superuser app) -->
|
|
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
|
|
|
<application
|
|
android:name="FDroidApp"
|
|
android:icon="@drawable/ic_launcher"
|
|
android:label="@string/app_name"
|
|
android:description="@string/app_description"
|
|
android:allowBackup="true"
|
|
android:theme="@style/AppThemeDark"
|
|
android:supportsRtl="true"
|
|
tools:replace="theme, icon, label"
|
|
>
|
|
|
|
<provider
|
|
android:authorities="org.fdroid.fdroid.data.AppProvider"
|
|
android:name="org.fdroid.fdroid.data.AppProvider"
|
|
android:exported="false"/>
|
|
|
|
<provider
|
|
android:authorities="org.fdroid.fdroid.data.RepoProvider"
|
|
android:name="org.fdroid.fdroid.data.RepoProvider"
|
|
android:exported="false"/>
|
|
|
|
<provider
|
|
android:authorities="org.fdroid.fdroid.data.ApkProvider"
|
|
android:name="org.fdroid.fdroid.data.ApkProvider"
|
|
android:exported="false"/>
|
|
|
|
<provider
|
|
android:authorities="org.fdroid.fdroid.data.InstalledAppProvider"
|
|
android:name="org.fdroid.fdroid.data.InstalledAppProvider"
|
|
android:exported="false"/>
|
|
|
|
<activity
|
|
android:name=".FDroid"
|
|
android:launchMode="singleTop"
|
|
android:configChanges="keyboardHidden|orientation|screenSize" >
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.MAIN" />
|
|
|
|
<category android:name="android.intent.category.LAUNCHER" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="f-droid.org" />
|
|
<data android:host="www.f-droid.org" />
|
|
<data android:pathPrefix="/repository/browse" />
|
|
</intent-filter>
|
|
|
|
<meta-data
|
|
android:name="android.app.default_searchable"
|
|
android:value=".SearchResults" />
|
|
</activity>
|
|
<activity
|
|
android:name=".views.swap.ConnectSwapActivity"
|
|
android:theme="@style/SwapTheme.Wizard"
|
|
android:label=""
|
|
android:parentActivityName=".FDroid">
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
<intent-filter>
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="*" />
|
|
<data android:path="/FDROID/REPO/SWAP" />
|
|
<data android:path="/fdroid/repo/swap" />
|
|
</intent-filter>
|
|
</activity>
|
|
<!--
|
|
The title for ManageReposActivity is "F-Droid" here, but "Repositories"
|
|
when viewing the Activity itself in the app.
|
|
-->
|
|
<activity
|
|
android:name=".views.ManageReposActivity"
|
|
android:label="@string/app_name"
|
|
android:launchMode="singleTask"
|
|
android:parentActivityName=".FDroid" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="*" />
|
|
<!--
|
|
The pattern matcher here is poorly implemented, in particular the * is
|
|
non-greedy, so you have to do stupid tricks to match patterns that have
|
|
repeat characters in them. http://stackoverflow.com/a/8599921/306864
|
|
-->
|
|
<data android:path="/fdroid/repo" />
|
|
<data android:pathPattern="/fdroid/repo/*" />
|
|
<data android:pathPattern="/.*/fdroid/repo" />
|
|
<data android:pathPattern="/.*/fdroid/repo/*" />
|
|
<data android:pathPattern="/.*/.*/fdroid/repo" />
|
|
<data android:pathPattern="/.*/.*/fdroid/repo/*" />
|
|
<data android:pathPattern="/.*/.*/.*/fdroid/repo" />
|
|
<data android:pathPattern="/.*/.*/.*/fdroid/repo/*" />
|
|
<data android:path="/fdroid/archive" />
|
|
<data android:pathPattern="/fdroid/archive/*" />
|
|
<data android:pathPattern="/.*/fdroid/archive" />
|
|
<data android:pathPattern="/.*/fdroid/archive/*" />
|
|
<data android:pathPattern="/.*/.*/fdroid/archive" />
|
|
<data android:pathPattern="/.*/.*/fdroid/archive/*" />
|
|
<data android:pathPattern="/.*/.*/.*/fdroid/archive" />
|
|
<data android:pathPattern="/.*/.*/.*/fdroid/archive/*" />
|
|
<!--
|
|
Some QR Code scanners don't respect custom schemes like fdroidrepo://,
|
|
so this is a workaround, since the local repo URL is all uppercase in
|
|
the QR Code for sending the local repo to another device.
|
|
-->
|
|
<data android:path="/FDROID/REPO" />
|
|
<data android:path="/.*/FDROID/REPO" />
|
|
<data android:path="/.*/.*/FDROID/REPO" />
|
|
</intent-filter>
|
|
|
|
<meta-data
|
|
android:name="android.app.default_searchable"
|
|
android:value=".SearchResults" />
|
|
</activity>
|
|
<activity
|
|
android:name=".views.swap.ConnectSwapActivity"
|
|
android:theme="@style/SwapTheme.Wizard.ReceiveSwap"
|
|
android:label=""
|
|
android:noHistory="true"
|
|
android:parentActivityName=".FDroid">
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
</activity>
|
|
<activity
|
|
android:name=".ManageRepo"
|
|
android:label="@string/menu_manage"
|
|
android:launchMode="singleTask"
|
|
android:parentActivityName=".FDroid" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<!--
|
|
Android's scheme matcher is case-sensitive, so include
|
|
ALL CAPS versions to support ALL CAPS URLs in QR Codes.
|
|
QR Codes have a special ALL CAPS mode that uses a reduced
|
|
character set, making for more compact QR Codes.
|
|
-->
|
|
<data android:scheme="fdroidrepo" />
|
|
<data android:scheme="FDROIDREPO" />
|
|
<data android:scheme="fdroidrepos" />
|
|
<data android:scheme="FDROIDREPOS" />
|
|
</intent-filter>
|
|
<!-- Handle NFC tags detected from outside our application -->
|
|
<intent-filter>
|
|
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<!--
|
|
URIs that come in via NFC have scheme/host normalized to all lower case
|
|
https://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED
|
|
-->
|
|
<data android:scheme="fdroidrepo" />
|
|
<data android:scheme="fdroidrepos" />
|
|
</intent-filter>
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
|
|
<data android:mimeType="application/vnd.org.fdroid.fdroid.repo" />
|
|
</intent-filter>
|
|
</activity>
|
|
<activity
|
|
android:name=".NfcNotEnabledActivity"
|
|
android:noHistory="true" />
|
|
<activity android:name=".views.QrWizardDownloadActivity" />
|
|
<activity android:name=".views.QrWizardWifiNetworkActivity" />
|
|
<activity
|
|
android:name=".views.LocalRepoActivity"
|
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
|
android:label="@string/local_repo"
|
|
android:launchMode="singleTop"
|
|
android:parentActivityName=".FDroid"
|
|
android:screenOrientation="portrait" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
</activity>
|
|
<activity
|
|
android:name=".views.SelectLocalAppsActivity"
|
|
android:label="@string/setup_repo"
|
|
android:parentActivityName=".views.LocalRepoActivity" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".views.LocalRepoActivity" />
|
|
</activity>
|
|
<activity
|
|
android:name=".views.RepoDetailsActivity"
|
|
android:label="@string/menu_manage"
|
|
android:parentActivityName=".views.ManageReposActivity"
|
|
android:windowSoftInputMode="stateHidden">
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".ManageRepo" />
|
|
</activity>
|
|
|
|
<activity
|
|
android:name=".AppDetails"
|
|
android:label="@string/app_details"
|
|
android:exported="true"
|
|
android:parentActivityName=".FDroid" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="fdroid.app" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="market" android:host="details" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="http" />
|
|
<data android:scheme="https" />
|
|
<data android:host="f-droid.org" />
|
|
<data android:host="www.f-droid.org" />
|
|
<data android:pathPrefix="/app/" />
|
|
</intent-filter>
|
|
</activity>
|
|
<activity
|
|
android:label="@string/menu_preferences"
|
|
android:name=".PreferencesActivity"
|
|
android:parentActivityName=".FDroid" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
</activity>
|
|
<activity
|
|
android:label="@string/menu_swap"
|
|
android:name=".views.swap.SwapActivity"
|
|
android:parentActivityName=".FDroid"
|
|
android:theme="@style/SwapTheme.Wizard">
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
</activity>
|
|
<activity
|
|
android:name=".SearchResults"
|
|
android:label="@string/search_results"
|
|
android:exported="true"
|
|
android:launchMode="singleTop"
|
|
android:parentActivityName=".FDroid" >
|
|
<meta-data
|
|
android:name="android.support.PARENT_ACTIVITY"
|
|
android:value=".FDroid" />
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.SEARCH" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="fdroid.search" />
|
|
</intent-filter>
|
|
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.VIEW" />
|
|
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
|
|
<data android:scheme="market" android:host="search" />
|
|
</intent-filter>
|
|
|
|
<meta-data
|
|
android:name="android.app.searchable"
|
|
android:resource="@xml/searchable" />
|
|
</activity>
|
|
|
|
<!--Used for SSL TOFU, supported by extern/MemorizingTrustManager lib -->
|
|
<activity
|
|
android:name="de.duenndns.ssl.MemorizingActivity"
|
|
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
|
|
|
<receiver android:name=".StartupReceiver" >
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
|
|
<category android:name="android.intent.category.HOME" />
|
|
</intent-filter>
|
|
</receiver>
|
|
<receiver android:name=".PackageAddedReceiver" >
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.PACKAGE_ADDED" />
|
|
|
|
<data android:scheme="package" />
|
|
</intent-filter>
|
|
</receiver>
|
|
<receiver android:name=".PackageUpgradedReceiver" >
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.PACKAGE_REPLACED" />
|
|
|
|
<data android:scheme="package" />
|
|
</intent-filter>
|
|
</receiver>
|
|
<receiver android:name=".PackageRemovedReceiver" >
|
|
<intent-filter>
|
|
<action android:name="android.intent.action.PACKAGE_REMOVED" />
|
|
|
|
<data android:scheme="package" />
|
|
</intent-filter>
|
|
</receiver>
|
|
<receiver android:name=".WifiStateChangeReceiver" >
|
|
<intent-filter>
|
|
<action android:name="android.net.wifi.STATE_CHANGE" />
|
|
</intent-filter>
|
|
</receiver>
|
|
|
|
<service android:name=".UpdateService" />
|
|
<service android:name=".net.WifiStateChangeService" />
|
|
<service android:name=".localrepo.LocalRepoService" />
|
|
</application>
|
|
|
|
</manifest>
|