BobStore/app/src/main/AndroidManifest.xml

465 lines
20 KiB
XML
Raw Normal View History

2010-10-19 23:24:04 +01:00
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fdroid.fdroid"
android:installLocation="auto">
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="23"
/>
<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.telephony"
android:required="false" />
<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_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.NFC" />
2014-12-31 01:00:31 +01:00
<uses-permission android:name="org.fdroid.fdroid.privileged.USE_SERVICE" />
2014-12-31 01:00:31 +01:00
<!-- Indicate that F-Droid may request root access (introduced by Koush's Superuser app)
This permission is deprecated, but necessary for some old superuser
apps to actually grant superuser access to F-Droid. -->
<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"
2013-09-23 21:22:56 +02:00
android:allowBackup="true"
android:fullBackupContent="true"
android:theme="@style/AppThemeLight"
android:supportsRtl="true"
>
Removed DB, implemented AppProvider. Yay! As expected, a lot of the stuff in DB class is due to UpdateService requiring it to process the downloaded indexes and insert data into the database. Thus, this change is about removing that stuff from the DB class and migrating to ContentProviders. This required a bit of a change to the way that UpdateService decides what to do with the data from indexes, but I hope it will make understanding and changing UpdateService easier in the long term. For example, it used to read the app details from database, then if a repo wasn't updated (due to unchanged index) then it would take the app details for that repo from the list of apps, and re-update the database (or something like that). Now, it has been refactored into the following methods: * updateOrInsertApps(appsToUpdate); * updateOrInsertApks(apksToUpdate); * removeApksFromRepos(disabledRepos); * removeApksNoLongerInRepo(appsToUpdate, updatedRepos); * removeAppsWithoutApks(); * and probably some others... Which hopefully are self-explanitory. The recent change to implement single repo updates was re-implemented with in light of the methods above. The interface to UpdateService for scheduling a single repo update is the same as it was before, but the implementation is completely different. Still works though. Using batch content provider operations for repo updates, but they suffer from the problem of not all being under the same transaction, so if an insert/update stuffs up half way through, we are left with only half of the update being complete. In the future, if there is some way to implement notifications from the content provider's applyBatch method, then we can do it all in the one transaction, and still have notifications. Currently we break it into several calls to applyBatch (and hence several transactions) to inform the user of the progress. Also adding the beginnings of some tests for AppProvider. In the future, I'll work on adding better coverage, including instrumentation to test UI features. ========================== Below is a list of many of the minor changes that also happened along the way ========================== Make "Can update" tab stay up to date using content observer, rather than manually deciding when to refresh the tab label as before. The installed app list is now cached in Utils, because it is invoked quite a few times, especially when rendering the app lists. The cache is invalidated when PackageReceiver is notified of new apps. The content providers don't notify changes if we are in batch mode. I've left the notification at the end of the batch updates as the responsibility of the UpdateService. However, it would be nice if this was somehow handled by the content, as they are really the ones who should worry about it. Made curVersion, curVercode and curApk work with providers. This was done by removing curApk (otherwise we'd need to query the db each time we fetched one app to get a reference to that apk (resulting in hundreds of queries). Instead, UpdateService now calculates curVercode and curVersion and saves them to the database. We then use these where possible. If we really need curApk (because we want info other than its version and code) we still have the option of ApkProvider.Helper.find(app.id, app.curVercode). I considered putting this inside the app value object, e.g. in getCurApk() but thought better of it as it will likely result in people invoking it all the time, without realising it causes a DB query. incompatibleReasons required a minor UI tweak, removing the "min sdk" ui element from the Apk list. It is replaced by the "Requires: %s" view (which only appears when the app is incompatible). In the process, and in response to some feedback from mvdan, I left the min sdk in there, but only made it show when in "expert mode", just like the architecture. In order to make the "installed apps" query work under test conditions, needed to change the way the InstalledApkCache be replaceable with a mock object. Pause UIL loading on fast scroll of list, as the list was very choppy for some reason. Re-added "Last repo scan" info to the Manage Repo list view. Fixed up some misc TODO's, removed some unused/empty functions.
2014-02-02 19:38:36 +11:00
<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.TempApkProvider"
android:name="org.fdroid.fdroid.data.TempApkProvider"
android:exported="false"/>
<provider
android:authorities="org.fdroid.fdroid.data.TempAppProvider"
android:name="org.fdroid.fdroid.data.TempAppProvider"
android:exported="false"/>
<provider
android:authorities="org.fdroid.fdroid.data.InstalledAppProvider"
android:name="org.fdroid.fdroid.data.InstalledAppProvider"
android:exported="false"/>
<meta-data
android:name="android.app.default_searchable"
android:value=".FDroid" />
<activity
android:name=".FDroid"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize"
android:configChanges="layoutDirection|locale|keyboardHidden|orientation|screenSize" >
<!-- App URLs -->
<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="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="http" />
<data android:scheme="https" />
<data android:host="f-droid.org" />
<data android:host="www.f-droid.org" />
<data android:pathPrefix="/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="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>
<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="play.google.com" /> <!-- they don't do www. -->
<data android:path="/store/apps/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="amzn" android:host="apps" android:path="/android" />
</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="amazon.com" />
<data android:host="www.amazon.com" />
<data android:path="/gp/mas/dl/android" />
</intent-filter>
<!-- Search URLs -->
<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>
<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="play.google.com" /> <!-- they don't do www. -->
<data android:path="/store/search" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
<!-- 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>
<!-- Repo URLs -->
<!--
This intent serves two purposes: Swapping apps between devices and adding a
repo from a website (e.g. https://guardianproject.info/fdroid/repo).
We intercept both of these situations in the FDroid activity, and then redirect
to the appropriate handler (swap handling, manage repos respectively) from there.
The reason for this is that the only differentiating factor is the presence
of a "swap=1" in the query string, and intent-filter is unable to deal with
query parameters. An alternative would be to do something like fdroidswap:// as
a scheme, but then we. Need to copy/paste all of this intent-filter stuff and
keep it up to date when it changes or a bug is found.
-->
<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="http" />
<data android:scheme="HTTP" />
<data android:scheme="https" />
<data android:scheme="HTTPS" />
<data android:scheme="fdroidrepo" />
<data android:scheme="FDROIDREPO" />
<data android:scheme="fdroidrepos" />
<data android:scheme="FDROIDREPOS" />
<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:pathPattern="/.*/FDROID/REPO" />
<data android:pathPattern="/.*/.*/FDROID/REPO" />
<data android:pathPattern="/.*/.*/.*/FDROID/REPO" />
</intent-filter>
Implemented client connection for swap. 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.
2014-07-05 07:49:37 +09:30
</activity>
<activity
2015-08-26 15:44:41 +02:00
android:name=".privileged.views.InstallConfirmActivity"
android:label="@string/menu_install"
android:theme="@style/MinWithDialogBaseThemeLight"
android:excludeFromRecents="true"
android:parentActivityName=".FDroid"
android:configChanges="layoutDirection|locale" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".FDroid" />
</activity>
<activity
android:name=".privileged.views.UninstallDialogActivity"
android:excludeFromRecents="true"
android:theme="@style/AppThemeTransparent" />
Implemented client connection for swap. 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.
2014-07-05 07:49:37 +09:30
<activity
android:name=".views.ManageReposActivity"
android:label="@string/app_name"
Implemented client connection for swap. 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.
2014-07-05 07:49:37 +09:30
android:launchMode="singleTask"
android:parentActivityName=".FDroid"
android:configChanges="layoutDirection|locale" >
Implemented client connection for swap. 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.
2014-07-05 07:49:37 +09:30
<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" />
<data android:mimeType="application/vnd.org.fdroid.fdroid.repo" />
</intent-filter>
</activity>
<activity
android:name=".NfcNotEnabledActivity"
android:noHistory="true"
android:configChanges="layoutDirection|locale" />
<activity
android:name=".views.RepoDetailsActivity"
android:label="@string/repo_details"
android:parentActivityName=".views.ManageReposActivity"
android:windowSoftInputMode="stateHidden"
android:configChanges="layoutDirection|locale" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".views.ManageReposActivity" />
</activity>
<activity
android:name=".AppDetails"
2013-07-28 13:50:42 +02:00
android:label="@string/app_details"
android:exported="true"
android:parentActivityName=".FDroid"
android:configChanges="layoutDirection|locale" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".FDroid" />
</activity>
<activity
android:label="@string/menu_settings"
android:name=".PreferencesActivity"
android:parentActivityName=".FDroid" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".FDroid" />
</activity>
<activity
android:name="org.fdroid.fdroid.CrashReportActivity"
android:theme="@style/AppThemeDark"
android:process=":error_report"
android:launchMode="singleInstance"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true" />
<activity
android:label="@string/swap"
android:name=".views.swap.SwapWorkflowActivity"
android:parentActivityName=".FDroid"
android:theme="@style/SwapTheme.Wizard"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".FDroid" />
</activity>
<!-- Note: AppThemeTransparent, this activity shows dialogs only -->
<activity
android:name=".privileged.install.InstallExtensionDialogActivity"
android:theme="@style/AppThemeTransparent" />
<receiver
android:name=".privileged.install.InstallExtensionBootReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
2016-05-31 22:44:58 +02:00
<!-- Note: AppThemeTransparent, this activity shows dialogs only -->
2016-05-19 00:32:55 +03:00
<activity
android:name=".installer.DefaultInstallerActivity"
2016-05-19 00:32:55 +03:00
android:theme="@style/AppThemeTransparent" />
2016-05-31 22:44:58 +02:00
<!-- Note: AppThemeTransparent, this activity shows dialogs only -->
<activity
android:name=".installer.ErrorDialogActivity"
android:theme="@style/AppThemeTransparent" />
2014-12-31 01:00:31 +01:00
2015-03-30 20:57:31 +02:00
<receiver android:name=".receiver.StartupReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<receiver android:name=".receiver.PackageManagerReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
2012-10-19 08:39:56 +01:00
<data android:scheme="package" />
</intent-filter>
</receiver>
2015-03-30 20:57:31 +02:00
<receiver android:name=".receiver.WifiStateChangeReceiver" >
<intent-filter>
<action android:name="android.net.wifi.STATE_CHANGE" />
</intent-filter>
</receiver>
<service android:name=".UpdateService" />
<service
android:name=".net.DownloaderService"
android:exported="false" />
2016-05-19 00:32:55 +03:00
<service
android:name=".installer.InstallerService"
android:exported="false" />
<service
android:name=".CleanCacheService"
android:exported="false" />
<service android:name=".net.WifiStateChangeService" />
WIP: Refactoring swap service. Removed LocalRepoService, replaced with SwapService. Still TODO: Manage threads. Currently everything is called from the UI thread, which is a regression from the previous behaviour. I'd like to manage this so that the code interacting with the SwapManager doesn't need to bother itself with whether it is calling from the UI thread or not. The local repo service had many different methods and properties for dealing with starting and stopping various things (webserver, bonjour, in the future it will also need to know about bluetooth and Wifi AP). The SwapService handles this stuff by delegating to specific classes that are only responsible for one of these. Hopefully this will make the process of enabling and disabling swap repos easier to reason about. The local repo service was also stopped and started quite regularly. This meant it was up to the code making use of the service to know if it was running or not, and to enable it if required. The new SwapService is only started once (when the singleton SwapManager is created for the first time). It should not use any more resources, because it is a background service most the time, and it is responsible for moving itself to the foreground when required (the burden is not on the code consuming this service to know when to do this). By having the service running more often, it doesn't need to' continually figure out if it needs to register or unregister listeners for various properties (e.g. https enabled) or wifi broadcasts. The listeners can stay active, and do nothing once notified if swapping is not enabled. Moved the timeout timer (which cancels the swap service after 15 mins) into the SwapService, rather than being managed by the SwapWorkflowActivity. Seems more appropriate for the service to know to time itself out rather than the Activity, seeing as the Activity can die and get GC'ed while the service is still running. Finally, although there is nothing stopping code in F-Droid from talking to the service directly, it is now handled by the SwapManager singleton. This means that details such as using a Messenger or Handler object in order to communicate via arg1 and arg2 is no longer required, and instead methods with proper type signatures can be used. This is similar (but not exactly the same) to how Android system services work. That is, ask for a "Manager" object using getSystemService(), and then use that to perform functionality and query state via that object, which delegates to the service. Then we get the best of both worlds: * Reasonable and type safe method signatures * Services that are not tied to activity lifecycles, which persist beyond the closing of the swap activity.
2015-05-31 22:54:57 +10:00
<service android:name=".localrepo.SwapService" />
<service
android:name=".installer.InstallManagerService"
android:exported="false" />
<service
android:name=".localrepo.CacheSwapAppsService"
android:exported="false" />
<service
android:name=".data.InstalledAppProviderService"
android:exported="false" />
</application>
2012-10-19 20:37:36 +01:00
</manifest>