summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-03-17 16:35:01 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-03-17 16:35:01 -0700
commit977d38d21876fbc39598ff0a966a27db92ee1d59 (patch)
treeadd84188d80cd22ffa3ea87671c6038721790819
parentf8e520e6b7ba9533117d4805a29fb7321534d6ce (diff)
parentd311b453a4ea32dcc01e766da972c6837b7705ec (diff)
downloadandroid_packages_providers_DownloadProvider-977d38d21876fbc39598ff0a966a27db92ee1d59.tar.gz
android_packages_providers_DownloadProvider-977d38d21876fbc39598ff0a966a27db92ee1d59.tar.bz2
android_packages_providers_DownloadProvider-977d38d21876fbc39598ff0a966a27db92ee1d59.zip
Merge commit 'remotes/korg/cupcake' into merge
Conflicts: docs/index.html src/com/android/providers/downloads/DownloadProvider.java src/com/android/providers/downloads/DownloadService.java
-rw-r--r--Android.mk2
-rw-r--r--docs/index.html377
-rw-r--r--res/values-cs/strings.xml4
-rw-r--r--res/values-de/strings.xml4
-rw-r--r--res/values-es/strings.xml4
-rw-r--r--res/values-fr/strings.xml4
-rw-r--r--res/values-it/strings.xml4
-rw-r--r--res/values-ja/strings.xml10
-rw-r--r--res/values-ko/strings.xml31
-rw-r--r--res/values-nb/strings.xml32
-rw-r--r--res/values-nl/strings.xml6
-rw-r--r--res/values-pl/strings.xml4
-rw-r--r--res/values-ru/strings.xml4
-rw-r--r--res/values-zh-rCN/strings.xml4
-rw-r--r--res/values-zh-rTW/strings.xml4
-rw-r--r--src/com/android/providers/downloads/DownloadService.java4
16 files changed, 468 insertions, 30 deletions
diff --git a/Android.mk b/Android.mk
index 82f0d585..ee7dca29 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,8 +1,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE_TAGS := user development
-
LOCAL_SRC_FILES := $(call all-subdir-java-files)
LOCAL_PACKAGE_NAME := DownloadProvider
diff --git a/docs/index.html b/docs/index.html
index 54d65f5b..a073a004 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -824,5 +824,382 @@ Cupcake, format version <code>100</code>: Same as format version <code>31</code>
<p />
<h2><a name="Future_Directions"> </a> Future Directions </h2>
<!--_>small<What could be done in the future to improve the product.>/small<_-->
+<p />
+<b>WARNING</b> This section is for informative purposes only.
+<p />
+<h3><a name="API"> </a> API </h3>
+<p />
+<ul>
+<li> Expose Download Manager to 3rd party apps - security, robustness .
+</li>
+<li> Validate application-provided user agent, cookies, etc... to protect against e.g. header injection.
+</li>
+<li> Allow trust-and-verify MIME type.
+</li>
+<li> Extract response string from HTTP responses, extract entity from failed responses
+</li>
+<li> If app fails to be notified, retry later - don't give up because of a single failure.
+</li>
+<li> Support data: URIs .
+</li>
+<li> Download files to app-provided content provider .
+</li>
+<li> Don't pass HTTP codes above about 490 to the initiating app (figure out what the threshold should be).
+</li>
+<li> Allow initiating app to specify that it wants wifi-only downloads .
+</li>
+<li> Provide SQL "where" clauses for the different categories of status codes, matching isStatusXXX().
+</li>
+<li> There has to be a mechanism by which old downloads are automatically purged from /cache if there's not enough space .
+</li>
+<li> Clicking the notification for a completed download should go through the initiating app instead of directly opening the file (but what about fire and forget?).
+</li>
+<li> Clean up the difference between pending_network (waiting for network) and running_paused (user paused the download).
+</li>
+<li> Allow any app to access the downloaded file (but no other column) of user-downloaded files .
+</li>
+<li> Provider should return more errors and throw fewer exceptions if possible.
+</li>
+<li> Add option to auto-dismiss notifications for completed downloads after a given time .
+</li>
+<li> Delete filename in case of failure - better handle the separation between filename and content URI.
+</li>
+<li> Allow the initiating application to specify that it wants to restart downloads from scratch if they're interrupted and can't be resumed .
+</li>
+<li> Save images directly from browser without re-downloading data .
+</li>
+<li> Give applications the ability to explicitly specify the full target filename (not just a hint).
+</li>
+<li> Give applications the ability to download multiple files into multiple set locations as if they were a single "package".
+</li>
+<li> Give applications the ability to download files only if they haven't been already downloaded.
+</li>
+<li> Give applications the ability to download files that have already been downloaded only if there's a newer version.
+</li>
+<li> Set-cookie in the response.
+</li>
+<li> basic auth .
+</li>
+<li> app-provided prompts for basic auth, ssl, redirects.
+</li>
+<li> File should be hidden from initiating application when DRM.
+</li>
+<li> Delay writing of app-visible filename column until file visible (split user-visible vs private files?).
+</li>
+<li> Separate locally-generated status codes from standard HTTP codes.
+</li>
+<li> Allow app to specify it doesn't want to resume downloads across reboots (because they might require additional work).
+</li>
+<li> Allow app to prioritize user-initiated downloads.
+</li>
+<li> Allow app to specify length of download (full trust, or trust-and-verify).
+</li>
+<li> Support POST.
+</li>
+<li> Support PUT.
+</li>
+<li> Support plugins for additional protocols and download descriptors.
+</li>
+<li> Rename columns to have an appropriate COLUMN_ prefix.
+</li>
+</ul>
+<p />
+<h3><a name="HTTP_Handling"> </a> HTTP Handling </h3>
+<p />
+<ul>
+<li> Fail download immediately on authoritative unresolved hostnames .
+</li>
+<li> The download manager should use the browser's user-agent by default.
+</li>
+<li> Redirect with HTTP Refresh headers (download current and target content with non-zero refresh).
+</li>
+<li> Handle content-encoding header.
+</li>
+<li> Handle transfer-encoding header.
+</li>
+<li> Find other ways to validate interrupted downloads (signature, last-mod/if-modified-since) .
+</li>
+<li> Make downloads time out in case of long time with no activity.
+</li>
+</ul>
+<p />
+<h3><a name="File_names"> </a> File names </h3>
+<p />
+<ul>
+<li> Protect against situations where there's already a "downloads" directory on SD card.
+</li>
+<li> Deal with filenames with invalid characters.
+</li>
+<li> Refine the logic that builds filenames to better match desktop browsers - drop the query string.
+</li>
+<li> URI-decode filenames generated from URIs.
+</li>
+<li> Better deal with filenames that end in '.'.
+</li>
+<li> Deal with URIs that end in '/' or '?'.
+</li>
+<li> Investigate how to better deal with filenames that have multiple extensions.
+</li>
+</ul>
+<p />
+<h3><a name="UI"> </a> UI </h3>
+<p />
+<ul>
+<li> Prompt for redirects across domains or cancel.
+</li>
+<li> Prompt for redirects from SSL or cancel.
+</li>
+<li> Prompt for basic auth or cancel.
+</li>
+<li> Prompt for SSL with untrusted/invalid/expired certificates or cancel.
+</li>
+<li> Reduce number of icons in the title bar, possibly as low as 1 (animated if there are ongoing downloads, fixed if all downloads have completed) .
+</li>
+<li> UI to cancel visible downloads.
+</li>
+<li> UI to pause visible downloads.
+</li>
+<li> Reorder downloads.
+</li>
+<li> View SSL certificates.
+</li>
+<li> Indicate secure downloads.
+</li>
+</ul>
+<p />
+<h3><a name="Handling_of_specific_MIME_types"> </a> Handling of specific MIME types </h3>
+<p />
+<ul>
+<li> Parse HTML for redirects with meta tag.
+</li>
+<li> Handle charsets and transcoding of text files.
+</li>
+<li> Deal with multiparts.
+</li>
+<li> Support OMA downloads with DD and data in same multipart, i.e. combined delivery.
+</li>
+<li> Assume application/octet-stream for http responses with no mime type.
+</li>
+<li> Download anything if an app supports application/octet-stream.
+</li>
+<li> Download any text/* if an application supports text/plain.
+</li>
+<li> Should the media scanner be invoked on DRM downloads?
+</li>
+<li> Refresh header with timer should be followed if content is not downloadable.
+</li>
+<li> Support OMA downloads.
+</li>
+<li> Support MIDP-OTA downloads.
+</li>
+<li> Support Sprint MCD downloads.
+</li>
+<li> Sniff content when receiving MIME-types known to be inaccurately sent by misconfigured servers.
+</li>
+</ul>
+<p />
+<h3><a name="Management_of_downloads_based_on"> </a> Management of downloads based on environment </h3>
+<p />
+<ul>
+<li> If the device routinely connects over wifi, delay non-interactive downloads by a certain amount of time in case wifi becomes available
+</li>
+<li> Turn on wifi if possible
+</li>
+<li> Fall back to cell when wifi is available but download doesn't proceed
+</li>
+<li> Be smarter about spurious losses (i.e. exceptions while network appears up) when the active network changes (e.g. turn on wifi while downloading over cell).
+</li>
+<li> Investigate the use of wifi locks, especially when performing non-resumable downloads.
+</li>
+<li> Poll network state (and maybe even try to connect) even without notifications from the connectivity manager (in case the notifications go AWOL or get inconsistent) .
+</li>
+<li> Pause when conditions degrade .
+</li>
+<li> Pause when roaming.
+</li>
+<li> Throttle or pause when user is active.
+</li>
+<li> Pause on slow networks (2G).
+</li>
+<li> Pause when battery is low.
+</li>
+<li> Throttle to not overwhelm the link.
+</li>
+<li> Pause when sync is active.
+</li>
+<li> Deal with situations where the active connection is down but there's another connection available
+</li>
+<li> Download files at night when the user is not explicitly waiting.
+</li>
+</ul>
+<p />
+<h3><a name="Management_of_simultaneous_downl"> </a> Management of simultaneous downloads </h3>
+<p />
+<ul>
+<li> Pipeline requests on limited number of sockets, run downloads sequentially .
+</li>
+<li> Manage bandwidth to not starve foreground tasks.
+</li>
+<li> Run unsized downloads on their own (on a per-filesystem basis) to avoid failing multiple of them because of a full filesystem .
+</li>
+</ul>
+<p />
+<h3><a name="Minor_functional_changes_edge_ca"> </a> Minor functional changes, edge cases </h3>
+<p />
+<ul>
+<li> The database could be somewhat checked when it's opened.
+</li>
+<li> <em>[DownloadProvider.java]</em> When upgrading the database, the numbering of ids should restart where it left off.
+</li>
+<li> <em>[DownloadProvider.java]</em> Handle errors when failing to start the service.
+</li>
+<li> <em>[DownloadProvider.java]</em> Explicitly populate all database columns that have documented default values, investigate whether that can be done at the SQL level.
+</li>
+<li> <em>[DownloadProvider.java]</em> It's possible that the last update time should be updated by the Sevice logic, not by the content provider.
+</li>
+<li> When relevant, combine logged messages on fewer lines.
+</li>
+<li> <em>[DownloadService.java]</em> Trim the database in the provider, not in the service. Notify application when trimming. Investigate why the row count seems off by one. Enforce on an ongoing basis.
+</li>
+<li> <em>[DownloadThread.java]</em> When download is restarted and MIME type wasn't provided by app, don't re-use MIME type.
+</li>
+<li> <em>[DownloadThread.java]</em> Deal with mistmatched file data sizes (between database and filesystem) when resuming a download, or with missing files that should be here.
+</li>
+<li> <em>[DownloadThread.java]</em> Validate that the response content-length can be properly parsed (i.e. presence of a string doesn't guarantee correctness).
+</li>
+<li> <em>[DownloadThread.java]</em> Be finer-grained with the way file permissions are managed in /cache - don't 0644 everything .
+</li>
+<li> Truncate files before deleting them, in case they're still open cross-process.
+</li>
+<li> Restart from scratch downloads that had very little progress .
+</li>
+<li> Deal with situations where /data is full as it prevents the database from growing (DoS) .
+</li>
+<li> Wait until file scanned to notify that download is completed.
+</li>
+<li> Missing some detailed logging about IOExceptions.
+</li>
+<li> Allow to disable LOGD debugging independently from system setting.
+</li>
+<li> Pulling the battery during a download corrupts files (lots of zeros written) .
+</li>
+<li> Should keep a bit of "emergency" database storage to initiate the download of an OTA update, in a file that is pre-allocated whenever possible (how to know it's an OTA update?).
+</li>
+<li> Figure out how to hook up into dumpsys and event log.
+</li>
+<li> Use the event log to log download progress.
+</li>
+<li> Use /cache to stage downloads that eventually go to the sd card, to avoid having sd files open too long in case the use pulls the card and to avoid partial files for too long.
+</li>
+<li> Maintain per-application usage statistics.
+</li>
+<li> There might be corner cases where the notifications are slightly off because different notifications might be using PendingIntents that can't be distinguished (differing only by their extras).
+</li>
+</ul>
+<p />
+<h3><a name="Architecture_and_Implementation"> </a> Architecture and Implementation </h3>
+<p />
+<ul>
+<li> The content:// Uri of individual downloads could be cached instead of being re-built whenever it's needed.
+</li>
+<li> <em>[DownloadProvider.java]</em> Solidify extraction of id from URI
+</li>
+<li> <em>[DownloadProvider.java]</em> Use ContentURIs.parseId(uri) to extra the id from various functions.
+</li>
+<li> <em>[DownloadProvider.java]</em> Use StringBuilder to build the various queries.
+</li>
+<li> <em>[DownloadService.java]</em> Cache interface to the media scanner service more aggressively.
+</li>
+<li> <em>[DownloadService.java]</em> Investigate why unbinding from the media scanner service sometimes throws an exception
+</li>
+<li> <em>[DownloadService.java]</em> Handle exceptions in the service's UpdateThread - mark that there's no thread left.
+</li>
+<li> <em>[DownloadService.java]</em> At the end of UpdateThread, closing the cursor should be done even if there's an exception. Also log the exception, as we'd be in an inconsistent state.
+</li>
+<li> <em>[DownloadProvider.java]</em> Investigate whether the download provider should aggressively cache the result of <code>getContext()</code> and <code>getContext().getContentResolver()</code>
+</li>
+<li> Document the database columns that are most likely to stay unchanged throughout versions, to increase the chance being able to perform downgrades.
+</li>
+<li> <em>[DownloadService.java]</em> Sanity-check the ordering of the local cache when adding/removing rows.
+</li>
+<li> <em>[DownloadService.java]</em> Factor the code that checks for DRM types into a separate function.
+</li>
+<li> <em>[DownloadService.java]</em> Factor the code that notifies applications into a separate function (codepath with early 406 failure)
+</li>
+<li> <em>[DownloadService.java]</em> Check for errors when spawning download threads.
+</li>
+<li> <em>[DownloadService.java]</em> Potential race condition when a download completes at the same time as it gets deleted through the content provider - see deleteDownload().
+</li>
+<li> <em>[DownloadService.java]</em> Catch all exceptions in scanFile - don't trust a remote process to the point where we'd let it crash us.
+</li>
+<li> <em>[DownloadService.java]</em> Limit number of attempts to scan a file.
+</li>
+<li> <em>[DownloadService.java]</em> Keep less data in RAM, especially about completed downloads. Investigating cutting unused columns if necessary
+</li>
+<li> <em>[DownloadThread.java]</em> Don't let exceptions out of run() - that'd kill the service, which'd accomplish no good.
+</li>
+<li> <em>[DownloadThread.java]</em> Keep track of content-length responses in a long, not in a string that we keep parsing .
+</li>
+<li> <em>[DownloadThread.java]</em> Use variable-size buffer to avoid thousands of operations on large downloads
+</li>
+<li> <em>[Helpers.java]</em> Deal with atomicity of checking/creating file.
+</li>
+<li> <em>[Helpers.java]</em> Handle differences between content-location separators and filesystem separators.
+</li>
+<li> Optimize database queries: use projections to reduce number of columns and get constant column numbers.
+</li>
+<li> Index last-mod date in DB, because of ordered searches. Investigate whether other columns need to be indexed (Hidden?)
+</li>
+<li> Deal with the fact that sqlite INTEGER matches java long (63-bit) .
+</li>
+<li> Use a single HTTP client for the entire download manager.
+</li>
+<li> Could use fewer alarms - currently setting new alarm each time database updated .
+</li>
+<li> Obsolete columns should be removed from the database .
+</li>
+<li> Assign relevant names to threads.
+</li>
+<li> Investigate and handle the different subclasses of IOException appropriately .
+</li>
+<li> There's potentially a race condition around read-modify-write cycles in the database, between the Service's updateFromProvider thread and the worker threads (and possibly more). Those should be synchronized appropriately, and the provider should be hardened to prevent asynchronous changes to sensitive data (or to synchronize when there's no other way, though I'd rather avoid that) .
+</li>
+<li> Temporary file leaks when downloads are deleted while the service isn't running .
+</li>
+<li> Increase priority of updaterThread while in the critical section (to avoid issues of priority inheritance with the main thread).
+</li>
+<li> Explicitly specify which interface to use for a given download (to get better sync with the connection manager).
+</li>
+<li> Cancel the requests on more kinds of errors instead of trusting the garbage collector.
+</li>
+<li> Issues with the fact that parseInt can throw exceptions on invalid server headers.
+</li>
+</ul>
+<p />
+<h3><a name="Code_style_refactoring"> </a> Code style, refactoring </h3>
+<p />
+<ul>
+<li> Fix lint warnings
+</li>
+<li> Make sure that comments fit in 80 columns to match style guide
+</li>
+<li> Unify code style when dealing with lines longer than 100 characters
+</li>
+<li> <em>[Constants.java]</em> constants should be organized by logical groups to improve readability.
+</li>
+<li> Use fewer internal classes (Helpers, Constants...) .
+</li>
+</ul>
+<p />
+<h3><a name="Browser_changes"> </a> Browser changes </h3>
+<p />
+<ul>
+<li> Move download UI outside of browser, so that browser doesn't need to access the provider.
+</li>
+<li> Make browser sniff zips and jars to see if they're apks.
+</li>
+<li> Live handoff of browser-initiated downloads (download in browser, browser update download UI, hand over to download manager on retry).
+</li>
+</ul>
</body>
</html>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index cbac9ac2..96cd35c4 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Odeslat oznámení o stahování."</string>
<string name="permdesc_downloadCompletedIntent">"Umožní aplikaci odeslat oznámení o dokončení stahování. Škodlivé aplikace mohou pomocí tohoto nastavení zmást jiné aplikace, které stahují soubory."</string>
<string name="download_unknown_title">"&lt;Bez názvu&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"a ještě %d"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" a ještě %d"</string>
<string name="notification_download_complete">"Stahování bylo dokončeno"</string>
<string name="notification_download_failed">"Stahování bylo neúspěšné"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 966ab2fc..224245d0 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Benachrichtigungen zu Ladevorgängen senden"</string>
<string name="permdesc_downloadCompletedIntent">"Ermöglicht es der Anwendung, Benachrichtigungen zu abgeschlossenen Ladevorgängen zu senden. Diese Funktion kann von bösartigen Anwendungen dazu verwendet werden, den Ladevorgang anderer Anwendungen zu stören."</string>
<string name="download_unknown_title">"&lt;Unbenannt&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"und %d weitere"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" und %d weitere"</string>
<string name="notification_download_complete">"Ladevorgang abgeschlossen"</string>
<string name="notification_download_failed">"Fehler beim Ladevorgang"</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 388b6590..61e0dbf4 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Envío de notificaciones de descarga"</string>
<string name="permdesc_downloadCompletedIntent">"Permite que la aplicación envíe notificaciones sobre descargas completadas. Las aplicaciones malintencionadas pueden utilizar este permiso para confundir a otras aplicaciones que descarguen archivos."</string>
<string name="download_unknown_title">"&lt;Sin título&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"y %d más"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" y %d más"</string>
<string name="notification_download_complete">"Descarga completada"</string>
<string name="notification_download_failed">"Descarga incorrecta"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index d040a3cd..dd1693a3 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Envoyer des notifications de téléchargement."</string>
<string name="permdesc_downloadCompletedIntent">"Permet à l\'application d\'envoyer des notifications concernant les téléchargements effectués. Les applications malveillantes peuvent s\'en servir pour tromper les autres applications de téléchargement de fichiers."</string>
<string name="download_unknown_title">"&lt;Sans_titre&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"et %d autres"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" et %d autres"</string>
<string name="notification_download_complete">"Téléchargement terminé."</string>
<string name="notification_download_failed">"Échec du téléchargement"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 0e16675b..38b353c6 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Inviare notifiche di download."</string>
<string name="permdesc_downloadCompletedIntent">"Consente l\'invio da parte dell\'applicazione di notifiche relative ai download completati. Le applicazioni dannose possono sfruttare questa possibilità per \"confondere\" altre applicazioni usate per scaricare file."</string>
<string name="download_unknown_title">"&lt;Senza nome&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"e altri %d"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" e altri %d"</string>
<string name="notification_download_complete">"Download completato"</string>
<string name="notification_download_failed">"Download non riuscito"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index b2ab9c40..ceb551c4 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -16,16 +16,16 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="permlab_downloadManager">"ダウンロードマネージャーにアクセスします。"</string>
- <string name="permdesc_downloadManager">"アプリケーションでダウンロードマネージャーにアクセスしてファイルをダウンロードできるようにします。悪意のあるアプリケーションではこれを利用して、ダウンロードに深刻な影響を与えたり、個人データにアクセスしたりできます。"</string>
+ <string name="permdesc_downloadManager">"ダウンロードマネージャーにアクセスしてファイルをダウンロードすることをアプリケーションに許可します。悪意のあるアプリケーションがこれを利用して、ダウンロードに深刻な影響を与えたり、個人データにアクセスしたりする恐れがあり。"</string>
<string name="permlab_downloadManagerAdvanced">"ダウンロードマネージャーの高度な機能です。"</string>
<string name="permdesc_downloadManagerAdvanced">"ダウンロードマネージャーの高度な機能にアプリケーションでアクセスできるようにします。"\n" 悪意のあるアプリケーションではこれを利用して、ダウンロードに深刻な影響を与えたり、"\n" 個人情報にアクセスしたりできます。"</string>
<string name="permlab_cacheFilesystem">"システムキャッシュを使用します。"</string>
- <string name="permdesc_cacheFilesystem">"アプリケーションでシステムキャッシュを直接アクセス、変更、削除できるようにします。悪意のあるアプリケーションではこれを利用して、ダウンロードや他のアプリケーションに深刻な影響を与えたり、個人データにアクセスしたりできます。"</string>
+ <string name="permdesc_cacheFilesystem">"システムキャッシュの直接アクセス、変更、削除をアプリケーションに許可します。悪意のあるアプリケーションがダウンロードや他のアプリケーションに深刻な影響を与えたり、個人データにアクセスする恐れがあります。"</string>
<string name="permlab_downloadCompletedIntent">"ダウンロード通知を送信します。"</string>
- <string name="permdesc_downloadCompletedIntent">"ダウンロード完了の通知をアプリケーションから送信できるようにします。悪意のあるアプリケーションではこの通知を利用して、ファイルをダウンロードする他のアプリケーションの処理を妨害できます。"</string>
+ <string name="permdesc_downloadCompletedIntent">"ダウンロード完了の通知の送信をアプリケーションに許可します。悪意のあるアプリケーションがファイルをダウンロードする他のアプリケーションの処理を妨害する恐れがあります。"</string>
<string name="download_unknown_title">"&lt;無題&gt;"</string>
- <string name="notification_filename_separator">"、"</string>
- <string name="notification_filename_extras">"他%d件"</string>
+ <string name="notification_filename_separator">"、 "</string>
+ <string name="notification_filename_extras">" 他%d件"</string>
<string name="notification_download_complete">"ダウンロード完了"</string>
<string name="notification_download_failed">"ダウンロードに失敗しました"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
new file mode 100644
index 00000000..c37f4bd1
--- /dev/null
+++ b/res/values-ko/strings.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="permlab_downloadManager">"다운로드 관리자 액세스"</string>
+ <string name="permdesc_downloadManager">"응용 프로그램이 다운로드 관리자에 액세스하여 파일을 다운로드할 수 있습니다. 악성 응용 프로그램은 이 기능을 이용하여 다운로드를 손상시키고 개인 정보에 액세스할 수 있습니다."</string>
+ <string name="permlab_downloadManagerAdvanced">"다운로드 관리자 고급 기능"</string>
+ <string name="permdesc_downloadManagerAdvanced">"응용프로그램이 다운로드 관리자의 고급 기능에 액세스할 수 있습니다."\n" 악성 응용프로그램은 이 기능을 이용하여 다운로드를 중단시키고"\n" 개인 정보에 액세스할 수 있습니다."</string>
+ <string name="permlab_cacheFilesystem">"시스템 캐시 사용"</string>
+ <string name="permdesc_cacheFilesystem">"응용 프로그램이 시스템 캐시에 직접 액세스, 수정 및 삭제할 수 있습니다. 악성 응용 프로그램은 이 기능을 이용하여 다운로드와 기타 응용 프로그램을 심하게 손상시키고 개인 데이터에 액세스할 수 있습니다."</string>
+ <string name="permlab_downloadCompletedIntent">"다운로드 알림 보내기"</string>
+ <string name="permdesc_downloadCompletedIntent">"응용 프로그램이 완료된 다운로드에 대한 알림을 보낼 수 있습니다. 악성 응용 프로그램은 이 기능을 이용하여 파일을 다운로드하는 다른 응용 프로그램과 혼동하도록 할 수 있습니다."</string>
+ <string name="download_unknown_title">"&lt;제목없음&gt;"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" 및 %d개 이상"</string>
+ <string name="notification_download_complete">"다운로드 완료"</string>
+ <string name="notification_download_failed">"다운로드 실패"</string>
+</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
new file mode 100644
index 00000000..548d737d
--- /dev/null
+++ b/res/values-nb/strings.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="permlab_downloadManager">"Få tilgang til nedlasteren."</string>
+ <string name="permdesc_downloadManager">"Gir applikasjonen tilgang til nedlasteren, og å bruke den til å laste ned filer. Ondsinnede programmer kan bruke dette til å forstyrre nedlastinger og få tilgang til privat informasjon."</string>
+ <string name="permlab_downloadManagerAdvanced">"Avansert nedlastingsfunksjonalitet."</string>
+ <!-- no translation found for permdesc_downloadManagerAdvanced (8761177317775872287) -->
+ <skip />
+ <string name="permlab_cacheFilesystem">"Bruke systemets hurtigbuffer."</string>
+ <string name="permdesc_cacheFilesystem">"Gir applikasjonen direkte tilgang til systemets hurtigbuffer, inkludert å redigere og slette den. Ondsinnede applikasjoner kan bruke dette til å forstyrre nedlastinger og andre applikasjoner, og til å få tilgang til privat informasjon."</string>
+ <string name="permlab_downloadCompletedIntent">"Sende nedlastingsvarslinger"</string>
+ <string name="permdesc_downloadCompletedIntent">"Lar applikasjonen sende varslinger om ferdige nedlastinger. Ondsinnede applikasjoner kan bruke dette for å forvirre andre applikasjoner som laster ned filer."</string>
+ <string name="download_unknown_title">"&lt;Uten navn&gt;"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" samt %d til"</string>
+ <string name="notification_download_complete">"Ferdig nedlasting"</string>
+ <string name="notification_download_failed">"Mislykket nedlasting"</string>
+</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 66c30b8b..cdaaf544 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -18,14 +18,14 @@
<string name="permlab_downloadManager">"Downloadbeheer weergeven."</string>
<string name="permdesc_downloadManager">"Hiermee kan de toepassing Downloadbeheer gebruiken om bestanden te downloaden. Kwaadwillende toepassingen kunnen hiervan gebruikmaken om downloads te verstoren en om toegang te krijgen tot privégegevens."</string>
<string name="permlab_downloadManagerAdvanced">"Geavanceerde functies van de downloadbeheerder."</string>
- <string name="permdesc_downloadManagerAdvanced">"Hiermee krijgt de toepassing toegang tot de geavanceerde functies van de downloadbeheerder."\n" Schadelijke toepassingen kunnen hiermee downloads onderbreken en toegang krijgen tot uw "\n" privégegevens."</string>
+ <string name="permdesc_downloadManagerAdvanced">"Hiermee krijgt de toepassing toegang tot de geavanceerde functies van de downloadbeheerder."\n" Schadelijke toepassingen kunnen hiermee downloads onderbreken en toegang krijgen tot uw "\n" privégegevens."</string>
<string name="permlab_cacheFilesystem">"Systeemcache gebruiken."</string>
<string name="permdesc_cacheFilesystem">"Hiermee kan de toepassing rechtstreeks de systeemcache openen, aanpassen of wissen. Kwaadwillende toepassingen kunnen hiervan gebruikmaken om downloads en andere toepassingen te verstoren en om toegang te krijgen tot privégegevens."</string>
<string name="permlab_downloadCompletedIntent">"Downloadmeldingen verzenden."</string>
<string name="permdesc_downloadCompletedIntent">"Hiermee ontvangt u een melding zodra een download is voltooid. Kwaadwillende toepassingen kunnen hiervan gebruikmaken om andere toepassingen die bestanden downloaden, in de war te brengen."</string>
<string name="download_unknown_title">"&lt;Zonder titel&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"en nog %d"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" en nog %d"</string>
<string name="notification_download_complete">"Downloaden is voltooid"</string>
<string name="notification_download_failed">"Downloaden is mislukt."</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7cd3e28e..6e77eafc 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Wysyłanie powiadomień o pobraniu."</string>
<string name="permdesc_downloadCompletedIntent">"Umożliwia programowi wysyłanie powiadomień o ukończeniu pobierania. Szkodliwe programy mogą korzystać z tego uprawnienia, aby zakłócić działanie innych programów pobierających pliki."</string>
<string name="download_unknown_title">"&lt;Bez nazwy&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"i %d innych"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" i %d innych"</string>
<string name="notification_download_complete">"Pobieranie zakończone."</string>
<string name="notification_download_failed">"Pobieranie nie powiodło się"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index fb2c5c5c..a76850f2 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"Отправлять уведомления о загрузках."</string>
<string name="permdesc_downloadCompletedIntent">"Разрешает приложениям отправлять уведомления о завершенных загрузках. Вредоносные приложения могут использовать это, чтобы передавать ложную информацию другим приложениям загрузки файлов."</string>
<string name="download_unknown_title">"&lt;Без названия&gt;"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"и еще %d"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" и еще %d"</string>
<string name="notification_download_complete">"Загрузка завершена"</string>
<string name="notification_download_failed">"Загрузка не удалась"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 642a7e09..7802b9bd 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"发送下载通知。"</string>
<string name="permdesc_downloadCompletedIntent">"允许应用程序发送关于已完成下载的通知。恶意应用程序可以使用该功能干扰其他下载文件的应用程序。"</string>
<string name="download_unknown_title">"&lt;未命名&gt;"</string>
- <string name="notification_filename_separator">"、"</string>
- <string name="notification_filename_extras">"以及另外 %d 个"</string>
+ <string name="notification_filename_separator">"、 "</string>
+ <string name="notification_filename_extras">" 以及另外 %d 个"</string>
<string name="notification_download_complete">"下载完成"</string>
<string name="notification_download_failed">"下载不成功"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index eeb4ea80..0bf222bc 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -24,8 +24,8 @@
<string name="permlab_downloadCompletedIntent">"傳送下載通知。"</string>
<string name="permdesc_downloadCompletedIntent">"下載完成時,允許應用程式送出通知。惡意程式可使用此功能干擾其他正在下載檔案的應用程式。"</string>
<string name="download_unknown_title">"(未命名)"</string>
- <string name="notification_filename_separator">","</string>
- <string name="notification_filename_extras">"還有 %d 項下載"</string>
+ <string name="notification_filename_separator">", "</string>
+ <string name="notification_filename_extras">" 還有 %d 項下載"</string>
<string name="notification_download_complete">"下載已完成。"</string>
<string name="notification_download_failed">"下載失敗"</string>
</resources>
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java
index 4a1d2f8e..07ab9416 100644
--- a/src/com/android/providers/downloads/DownloadService.java
+++ b/src/com/android/providers/downloads/DownloadService.java
@@ -625,11 +625,11 @@ public class DownloadService extends Service {
// nothing
mimetypeIntent.setDataAndType(Uri.fromParts("file", "", null), info.mMimeType);
- List<ResolveInfo> list = getPackageManager().queryIntentActivities(mimetypeIntent,
+ ResolveInfo ri = getPackageManager().resolveActivity(mimetypeIntent,
PackageManager.MATCH_DEFAULT_ONLY);
//Log.i(Constants.TAG, "*** QUERY " + mimetypeIntent + ": " + list);
- if (list.size() == 0) {
+ if (ri == null) {
if (Config.LOGD) {
Log.d(Constants.TAG, "no application to handle MIME type " + info.mMimeType);
}