summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-19 10:57:36 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-19 10:57:36 -0800
commitc2fb15f7689a10c7fe3b6c1f1ed0ce1f5a95ba9b (patch)
treec8fb9c87ea1ed534ba18f8c54b66724ce8190e90
parenteaeda874c62a0ebc439894858e110160b7e2a212 (diff)
downloadandroid_packages_providers_DownloadProvider-c2fb15f7689a10c7fe3b6c1f1ed0ce1f5a95ba9b.tar.gz
android_packages_providers_DownloadProvider-c2fb15f7689a10c7fe3b6c1f1ed0ce1f5a95ba9b.tar.bz2
android_packages_providers_DownloadProvider-c2fb15f7689a10c7fe3b6c1f1ed0ce1f5a95ba9b.zip
auto import from //branches/cupcake/...@132276
-rw-r--r--res/values-ja/strings.xml6
-rw-r--r--src/com/android/providers/downloads/DownloadService.java4
-rw-r--r--src/com/android/providers/downloads/Helpers.java5
3 files changed, 7 insertions, 8 deletions
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index b2ab9c40..d26c191e 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -16,13 +16,13 @@
<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>
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java
index d4b5f1e6..0600cfb6 100644
--- a/src/com/android/providers/downloads/DownloadService.java
+++ b/src/com/android/providers/downloads/DownloadService.java
@@ -623,11 +623,11 @@ public class DownloadService extends Service {
// nothing
mimetypeIntent.setDataAndType(Uri.fromParts("file", "", null), info.mimetype);
- 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.mimetype);
}
diff --git a/src/com/android/providers/downloads/Helpers.java b/src/com/android/providers/downloads/Helpers.java
index 89a57313..7c6070f3 100644
--- a/src/com/android/providers/downloads/Helpers.java
+++ b/src/com/android/providers/downloads/Helpers.java
@@ -115,11 +115,10 @@ public class Helpers {
PackageManager pm = context.getPackageManager();
intent.setDataAndType(Uri.fromParts("file", "", null), mimeType);
- List<ResolveInfo> list = pm.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY);
+ ResolveInfo ri = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
//Log.i(Constants.TAG, "*** FILENAME QUERY " + intent + ": " + list);
- if (list.size() == 0) {
+ if (ri == null) {
if (Config.LOGD) {
Log.d(Constants.TAG, "no handler found for type " + mimeType);
}