summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml2
-rw-r--r--res/values-af/strings.xml12
-rw-r--r--res/values-am/strings.xml12
-rw-r--r--res/values-ar/strings.xml12
-rw-r--r--res/values-be/strings.xml12
-rw-r--r--res/values-bg/strings.xml12
-rw-r--r--res/values-ca/strings.xml12
-rw-r--r--res/values-cs/strings.xml12
-rw-r--r--res/values-da/strings.xml12
-rw-r--r--res/values-de/strings.xml20
-rw-r--r--res/values-el/strings.xml12
-rw-r--r--res/values-en-rGB/strings.xml12
-rw-r--r--res/values-es-rUS/strings.xml12
-rw-r--r--res/values-es/strings.xml12
-rw-r--r--res/values-et/strings.xml12
-rw-r--r--res/values-fa/strings.xml36
-rw-r--r--res/values-fi/strings.xml12
-rw-r--r--res/values-fr/strings.xml12
-rw-r--r--res/values-hi/strings.xml14
-rw-r--r--res/values-hr/strings.xml12
-rw-r--r--res/values-hu/strings.xml12
-rw-r--r--res/values-in/strings.xml16
-rw-r--r--res/values-it/strings.xml12
-rw-r--r--res/values-iw/strings.xml12
-rw-r--r--res/values-ja/strings.xml12
-rw-r--r--res/values-ko/strings.xml12
-rw-r--r--res/values-lt/strings.xml12
-rw-r--r--res/values-lv/strings.xml12
-rw-r--r--res/values-ms/strings.xml12
-rw-r--r--res/values-nb/strings.xml22
-rw-r--r--res/values-nl/strings.xml12
-rw-r--r--res/values-pl/strings.xml12
-rw-r--r--res/values-pt-rPT/strings.xml12
-rw-r--r--res/values-pt/strings.xml12
-rw-r--r--res/values-ro/strings.xml12
-rw-r--r--res/values-ru/strings.xml14
-rw-r--r--res/values-sk/strings.xml12
-rw-r--r--res/values-sl/strings.xml12
-rw-r--r--res/values-sr/strings.xml12
-rw-r--r--res/values-sv/strings.xml12
-rw-r--r--res/values-sw/strings.xml12
-rw-r--r--res/values-th/strings.xml12
-rw-r--r--res/values-tl/strings.xml12
-rw-r--r--res/values-tr/strings.xml14
-rw-r--r--res/values-uk/strings.xml12
-rw-r--r--res/values-vi/strings.xml12
-rw-r--r--res/values-zh-rCN/strings.xml14
-rw-r--r--res/values-zh-rTW/strings.xml12
-rw-r--r--res/values-zu/strings.xml12
-rw-r--r--res/values/strings.xml37
-rw-r--r--src/com/android/providers/downloads/Constants.java2
-rw-r--r--src/com/android/providers/downloads/DownloadHandler.java42
-rw-r--r--src/com/android/providers/downloads/DownloadInfo.java23
-rw-r--r--src/com/android/providers/downloads/DownloadNotification.java287
-rw-r--r--src/com/android/providers/downloads/DownloadNotifier.java318
-rw-r--r--src/com/android/providers/downloads/DownloadProvider.java11
-rw-r--r--src/com/android/providers/downloads/DownloadReceiver.java210
-rw-r--r--src/com/android/providers/downloads/DownloadService.java36
-rw-r--r--src/com/android/providers/downloads/DownloadThread.java61
-rw-r--r--src/com/android/providers/downloads/OpenHelper.java125
-rw-r--r--src/com/android/providers/downloads/RealSystemFacade.java43
-rw-r--r--src/com/android/providers/downloads/StorageManager.java11
-rw-r--r--src/com/android/providers/downloads/SystemFacade.java32
-rw-r--r--tests/Android.mk2
-rw-r--r--tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java28
-rw-r--r--tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java2
-rw-r--r--tests/src/com/android/providers/downloads/FakeSystemFacade.java34
-rw-r--r--tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java59
-rw-r--r--ui/Android.mk5
-rw-r--r--ui/res/mipmap-xxhdpi/ic_launcher_download.pngbin0 -> 21228 bytes
-rw-r--r--ui/res/values-fa/strings.xml6
-rw-r--r--ui/res/values-zh-rCN/strings.xml2
-rw-r--r--ui/src/com/android/providers/downloads/ui/DownloadItem.java2
-rw-r--r--ui/src/com/android/providers/downloads/ui/DownloadList.java33
74 files changed, 1334 insertions, 709 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 05df6cd3..7a1ce39e 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -58,7 +58,7 @@
<application android:process="android.process.media"
android:label="@string/app_label">
<provider android:name=".DownloadProvider"
- android:authorities="downloads">
+ android:authorities="downloads" android:exported="true">
<!-- Anyone can access /my_downloads, the provider internally restricts access by UID for
these URIs -->
<path-permission android:pathPrefix="/my_downloads"
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index ba7862a3..5d6d6ead 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Kry toegang tot alle stelselaflaaisels"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Laat die program toe om alle aflaaisels wat deur enige program op hierdie stelsel geïnisieer is, te sien en te wysig."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Ongetiteld&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" en <xliff:g id="NUMBER">%d</xliff:g> meer"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Aflaai voltooi."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Aflaai onsuksesvol."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Aflaaiselgrootte vereis Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Kanselleer"</string>
<string name="button_start_now" msgid="792123674007840864">"Begin nou"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 leêr laai tans af"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> leêrs laai tans af"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 leêr wag tans"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> leêrs wag tans"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> oor"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Kan nie lêer oopmaak nie"</string>
</resources>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index 9893dece..ce4811ad 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"ሁሉንም የስርዓት ውርዶች ድረስ"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"መተግበሪያው በሥርዓቱ ላይ ባለ መተግበሪያ እንዲጀምር የተደረጉ አውርዶችን ለማየት እና ለማሻሻል ይፈቅድለታል::"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;ርዕስ አልባ&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" እና <xliff:g id="NUMBER">%d</xliff:g> ተጨማሪ...."</string>
<string name="notification_download_complete" msgid="5443563299253103667">"አውርድ ተጠናቋል::"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"አውርድ አልተሳካም።"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"የአውርድ መጠን Wi-Fi ይጠይቃል"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"ይቅር"</string>
<string name="button_start_now" msgid="792123674007840864">"አሁን ጀምር"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 ፋይል በማውረድ ላይ"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> ፋይሎች በማውረድ ላይ"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 ፋይል በመጠበቅ ላይ"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> ፋይሎች በመጠበቅ ላይ"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> ቀርቷል"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"ፋይል መክፈት አይቻልም"</string>
</resources>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index eac5035b..9b29f6b7 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"الدخول إلى جميع تنزيلات النظام"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"للسماح للتطبيق بعرض وتعديل جميع التنزيلات التي بدأت من خلال أي تطبيق على النظام."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;بلا عنوان&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">"، "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" و<xliff:g id="NUMBER">%d</xliff:g> أخرى"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"اكتمل التنزيل."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"أخفق التنزيل."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"يتطلب حجم التنزيل شبكة Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"إلغاء"</string>
<string name="button_start_now" msgid="792123674007840864">"البدء الآن"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"جارٍ تنزيل ملف واحد"</item>
+ <item quantity="other" msgid="9087228371320573153">"جارٍ تنزيل <xliff:g id="NUMBER">%d</xliff:g> من الملفات"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"هناك ملف واحد في وضع الانتظار"</item>
+ <item quantity="other" msgid="549229034166062887">"هناك <xliff:g id="NUMBER">%d</xliff:g> من الملفات في وضع الانتظار"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"المدة المتبقية: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"لا يمكن فتح الملف"</string>
</resources>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 7a9f9e47..ece2e91a 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Доступ да ўсіх сістэмных спамповак"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Дазваляе прыкладанню праглядаць і змяняць усе спампоўкi, пачатыя любым сiстэмным прыкладаннем."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Без назвы&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" і яшчэ <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Спампаванне завершана"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Не атрымалася спампаваць."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Для спампавання патрабуецца сетка Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Адмена"</string>
<string name="button_start_now" msgid="792123674007840864">"Пачаць прама цяпер"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Спампоўваецца 1 файл"</item>
+ <item quantity="other" msgid="9087228371320573153">"Спампоўваюцца файлы: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 файл чакае"</item>
+ <item quantity="other" msgid="549229034166062887">"Файлы чакаюць: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Засталося <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Не атрымлiваецца адкрыць файл"</string>
</resources>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 0eef1a85..179c29e7 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Достъп до всички изтегляния в системата"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Разрешава на приложението да преглежда и променя всички изтегляния, започнати от всяко приложение в системата."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Без заглавие&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" и още <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Изтеглянето завърши."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Изтеглянето не е успешно."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Изисква се Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Отказ"</string>
<string name="button_start_now" msgid="792123674007840864">"Стартиране сега"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 файл се изтегля"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> файла се изтеглят"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 файл се изчаква"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> файла се изчакват"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Оставащо време: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Файлът не може да се отвори"</string>
</resources>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 6187b5c9..ae9dabf1 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Accedeix a totes les baixades del sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permet que l\'aplicació consulti i modifiqui totes les baixades iniciades per una aplicació al sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sense títol&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" i <xliff:g id="NUMBER">%d</xliff:g> més"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Baixada completa."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Baixada incorrecta."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Mida baixad. req. Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancel·la"</string>
<string name="button_start_now" msgid="792123674007840864">"Inicia ara"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"S\'està baixant 1 fitxer"</item>
+ <item quantity="other" msgid="9087228371320573153">"S\'estan baixant <xliff:g id="NUMBER">%d</xliff:g> fitxers"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"S\'està esperant 1 fitxer"</item>
+ <item quantity="other" msgid="549229034166062887">"S\'estan esperant <xliff:g id="NUMBER">%d</xliff:g> fitxers"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Temps restant: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"No es pot obrir el fitxer"</string>
</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index c0850a5a..7a1dd6d5 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Přístup ke všem systémovým stahováním"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Umožňuje aplikaci zobrazit a upravovat všechna stahování zahájená libovolnou aplikací v systému."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Bez názvu&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" a ještě <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Stahování dokončeno."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Stahování bylo neúspěšné."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Vzhledem k velikosti stahovaného souboru je vyžadováno připojení Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Zrušit"</string>
<string name="button_start_now" msgid="792123674007840864">"Spustit"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Stahuje se 1 soubor"</item>
+ <item quantity="other" msgid="9087228371320573153">"Stahované soubory: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 čekající soubor"</item>
+ <item quantity="other" msgid="549229034166062887">"Čekající soubory: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> do stažení"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Soubor nelze otevřít"</string>
</resources>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index c7110862..a718871a 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Adgang til alle systemdownloads"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Tillader, at appen kan se og ændre alle downloads, der igangsættes af en app i systemet."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Uden titel&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" og <xliff:g id="NUMBER">%d</xliff:g> mere"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Downloaden er fuldført."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Downloaden mislykkedes."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Downloaden kræver Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Annuller"</string>
<string name="button_start_now" msgid="792123674007840864">"Begynd nu"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 fil downloades"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> filer downloades"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fil venter"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> filer venter"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> tilbage"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Filen kan ikke åbnes"</string>
</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 7216c07e..ac39f692 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -18,12 +18,12 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="3658948994665187911">"Download-Manager"</string>
<string name="permlab_downloadManager" msgid="7779544811202855500">"Auf Download-Manager zugreifen"</string>
- <string name="permdesc_downloadManager" msgid="4237406545998908947">"Ermöglicht der App, auf den Download-Manager zuzugreifen, um Dateien herunterzuladen. Schadprogramme könnten damit Downloads unterbrechen und auf persönliche Informationen zugreifen."</string>
+ <string name="permdesc_downloadManager" msgid="4237406545998908947">"Ermöglicht der App, auf den Download-Manager zuzugreifen, um Dateien herunterzuladen. Schadprogramme könnten damit Downloads unterbrechen und auf personenbezogene Daten zugreifen."</string>
<string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"Erweiterte Funktionen des Download-Managers."</string>
- <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Ermöglicht der App, auf die erweiterten Funktionen des Download-Managers zuzugreifen. Schadprogramme könnten damit Downloads unterbrechen und auf persönliche Informationen zugreifen."</string>
+ <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Ermöglicht der App, auf die erweiterten Funktionen des Download-Managers zuzugreifen. Schadprogramme könnten damit Downloads unterbrechen und auf personenbezogene Daten zugreifen."</string>
<string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"Benachrichtigungen zu Ladevorgängen senden"</string>
<string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Ermöglicht der App, Benachrichtigungen über abgeschlossene Downloads zu senden. Schadprogramme können dadurch andere Apps, die Dateien herunterladen, beeinträchtigen."</string>
- <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Alle USB-Speicher-Downloads anz."</string>
+ <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Alle USB-Speicher-Downloads"</string>
<string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Alle Downloads an SD-Karte anzeigen"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Ermöglicht der App, alle Downloads auf die SD-Karte anzuzeigen, unabhängig davon, von welcher App diese heruntergeladen wurden"</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Speicherplatz im Download-Cache reservieren"</string>
@@ -33,10 +33,8 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Zugriff auf alle System-Downloads"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Ermöglicht der App, alle Downloads anzuzeigen und zu ändern, die von Apps auf dem System gestartet wurden"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Unbenannt&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" und <xliff:g id="NUMBER">%d</xliff:g> weitere"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Download abgeschlossen"</string>
- <string name="notification_download_failed" msgid="8612136111952014978">"Download fehlgeschlagen"</string>
+ <string name="notification_download_failed" msgid="8612136111952014978">"Fehler bei Download"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Downloadgröße erfordert WLAN"</string>
<string name="notification_paused_in_background" msgid="4328508073283591772">"Im Hintergrund pausiert"</string>
<string name="wifi_required_title" msgid="1995971416871498179">"Download zu groß für Netzwerk dieses Betreibers."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Abbrechen"</string>
<string name="button_start_now" msgid="792123674007840864">"Jetzt starten"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 Datei wird heruntergeladen..."</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> Dateien werden heruntergeladen..."</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 Datei steht aus."</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> Dateien stehen aus."</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Noch <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Datei kann nicht geöffnet werden."</string>
</resources>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 6ab87da6..3fd01d6a 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Πρόσβαση σε όλα τα στοιχεία λήψης"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Επιτρέπει στην εφαρμογή την προβολή και τροποποίηση όλων των λήψεων που ξεκίνησαν από οποιαδήποτε εφαρμογή του συστήματος."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Χωρίς τίτλο&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" και <xliff:g id="NUMBER">%d</xliff:g> ακόμα"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Η λήψη ολοκληρώθηκε."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Ανεπιτυχής λήψη."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Η λήψη απαιτεί Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Ακύρωση"</string>
<string name="button_start_now" msgid="792123674007840864">"Έναρξη τώρα"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Γίνεται λήψη 1 αρχείου"</item>
+ <item quantity="other" msgid="9087228371320573153">"Γίνεται λήψη <xliff:g id="NUMBER">%d</xliff:g> αρχείων"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 αρχείο σε αναμονή"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> αρχεία σε αναμονή"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Απομένουν <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Δεν είναι δυνατό το άνοιγμα του αρχείου"</string>
</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 4c9630c3..72a171a2 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Access all system downloads"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Allows the app to view and modify all downloads initiated by any app on the system."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Untitled&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" and <xliff:g id="NUMBER">%d</xliff:g> more"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Download complete."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Download unsuccessful."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Download size requires Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancel"</string>
<string name="button_start_now" msgid="792123674007840864">"Start now"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 file downloading"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> files downloading"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 file waiting"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> files waiting"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> left"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Can\'t open file"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 422b7443..68b6a562 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Acceder a todas las descargas del sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permite que la aplicación vea y modifique las descargas que inició cualquier aplicación del sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sin título&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" y <xliff:g id="NUMBER">%d</xliff:g> más"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Se completó la descarga."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"No se pudo completar la descarga."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Tamaño requiere Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancelar"</string>
<string name="button_start_now" msgid="792123674007840864">"Comenzar ahora"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Descargando 1 archivo"</item>
+ <item quantity="other" msgid="9087228371320573153">"Descargando <xliff:g id="NUMBER">%d</xliff:g> archivos"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 archivo en espera"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> archivos en espera"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> restantes"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"No se puede abrir el archivo."</string>
</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 95594a44..3bdbfe06 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Acceso a todas las descargas del sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permite que la aplicación vea y modifique todas las descargas iniciadas por cualquier aplicación del sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sin título&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" y <xliff:g id="NUMBER">%d</xliff:g> más"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Descarga completada"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Descarga incorrecta"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"La descarga requiere Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancelar"</string>
<string name="button_start_now" msgid="792123674007840864">"Empezar ahora"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Descargando 1 archivo"</item>
+ <item quantity="other" msgid="9087228371320573153">"Descargando <xliff:g id="NUMBER">%d</xliff:g> archivos"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 archivo en espera"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> archivos en espera"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Tiempo restante: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Error al abrir el archivo"</string>
</resources>
diff --git a/res/values-et/strings.xml b/res/values-et/strings.xml
index 39812379..08ce2627 100644
--- a/res/values-et/strings.xml
+++ b/res/values-et/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Juurdepääs kõigile süsteemi allalaadimistele"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Võimaldab rakendusel vaadata ja muuta kõiki allalaadimisi, mille algatas süsteemis olev mis tahes rakendus."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Pealkirjata&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" ja <xliff:g id="NUMBER">%d</xliff:g> veel"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Allalaadimine on lõpetatud."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Allalaadimine ebaõnnestus."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Allalaad. on vaja WiFit."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Tühista"</string>
<string name="button_start_now" msgid="792123674007840864">"Alusta nüüd"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 faili allalaadimine"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> faili allalaadimine"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fail on ootel"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> faili on ootel"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Jäänud: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Faili ei saa avada"</string>
</resources>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 82284299..2c911822 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -18,23 +18,21 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="3658948994665187911">"Download Manager"</string>
<string name="permlab_downloadManager" msgid="7779544811202855500">"دسترسی به Download Manager."</string>
- <string name="permdesc_downloadManager" msgid="4237406545998908947">"به برنامه کاربردی اجازه میدهد تا به download manager دسترسی داشته باشد و از آن برای دانلود فایل‌ها استفاده کند. برنامه‌های مضر میتوانند از این امکان استفاده کرده و برای دانلودها مشکل ایجاد کنند و به اطلاعات خصوصی دسترسی داشته باشند."</string>
+ <string name="permdesc_downloadManager" msgid="4237406545998908947">"به برنامهٔ کاربردی اجازه می‌دهد تا به download manager دسترسی داشته باشد و از آن برای دانلود فایل‌ها استفاده کند. برنامه‌های مضر می‌توانند از این امکان استفاده کرده و برای دانلودها مشکل ایجاد کنند و به اطلاعات خصوصی دسترسی داشته باشند."</string>
<string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"عملکرد Download Manager پیشرفته."</string>
- <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"به برنامه کاربردی اجازه میدهد تا به عملکردهای پیشرفته download manager دسترسی داشته باشد. برنامه‌های مضر میتوانند از این امکان استفاده کرده و برای دانلودها مشکل ایجاد کنند و به اطلاعات خصوصی دسترسی داشته باشند."</string>
- <string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"اعلان های دانلود ارسال شود."</string>
- <string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"به برنامه کاربردی اجازه میدهد اعلان‌های مربوط به دانلودهای کامل شده را ارسال کند. برنامه‌های مضر میتوانند از این امکان استفاده کرده و برای سایر برنامه‌هایی که فایل‌ها را دانلود میکنند، مشکلاتی را ایجاد کنند."</string>
- <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"مشاهده همه دانلودها در حافظه USB"</string>
- <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"مشاهده همه دانلودها در کارت SD"</string>
- <string name="permdesc_seeAllExternal" msgid="1672759909065511233">"به برنامه کاربردی اجازه میدهد بدون در نظر گرفتن اینکه کدام برنامه دانلود را انجام داده است، تمام دانلودهای موجود در کارت SD را مشاهده کند."</string>
+ <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"به برنامهٔ کاربردی اجازه می‌دهد تا به عملکردهای پیشرفته download manager دسترسی داشته باشد. برنامه‌های مضر می‌توانند از این امکان استفاده کرده و برای دانلودها مشکل ایجاد کنند و به اطلاعات خصوصی دسترسی داشته باشند."</string>
+ <string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"اعلان‌های دانلود ارسال شود."</string>
+ <string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"به برنامهٔ کاربردی اجازه می‌دهد اعلان‌های مربوط به دانلودهای کامل شده را ارسال کند. برنامه‌های مضر می‌توانند از این امکان استفاده کرده و برای سایر برنامه‌هایی که فایل‌ها را دانلود می‌کنند، مشکلاتی را ایجاد کنند."</string>
+ <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"مشاهدهٔ همه دانلودها در حافظهٔ USB"</string>
+ <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"مشاهدهٔ همه دانلودها در کارت SD"</string>
+ <string name="permdesc_seeAllExternal" msgid="1672759909065511233">"به برنامهٔ کاربردی اجازه می‌دهد بدون در نظر گرفتن اینکه کدام برنامه دانلود را انجام داده است، تمام دانلودهای موجود در کارت SD را مشاهده کند."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"رزرو فضا در حافظه موقت دانلود"</string>
- <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"به برنامه کاربردی اجازه می‌دهد فایل‌ها را در حافظه پنهان دانلود کند، تا هنگامی که Download Manager به فضای بیشتری احتیاج دارد، بطور خودکار حذف نشوند.+"</string>
- <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"دانلود فایلها بدون اطلاع"</string>
- <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"به برنامه کاربردی اجازه میدهد فایل‌ها را از طریق Download Manager، بدون نمایش اعلان به کاربر دانلود کند."</string>
+ <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"به برنامهٔ کاربردی اجازه می‌دهد فایل‌ها را در حافظهٔ پنهان دانلود کند، تا هنگامی که Download Manager به فضای بیشتری احتیاج دارد، بطور خودکار حذف نشوند.+"</string>
+ <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"دانلود فایل‌ها بدون اطلاع"</string>
+ <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"به برنامهٔ کاربردی اجازه می‌دهد فایل‌ها را از طریق Download Manager، بدون نمایش اعلان به کاربر دانلود کند."</string>
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"دسترسی به همه دانلودهای سیستم"</string>
- <string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"به برنامه کاربردی اجازه میدهد تمام دانلودهای شروع شده توسط هر برنامه‌ای را در سیستم مشاهده کرده و تغییر دهد."</string>
+ <string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"به برنامهٔ کاربردی اجازه می‌دهد تمام دانلودهای شروع شده توسط هر برنامه‌ای را در سیستم مشاهده کرده و تغییر دهد."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;بدون عنوان&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">"، "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" و <xliff:g id="NUMBER">%d</xliff:g> بیشتر"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"دانلود کامل شد."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"دانلود ناموفق بود."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"برای این حجم از دانلود به Wi-Fi نیاز است."</string>
@@ -42,9 +40,19 @@
<string name="wifi_required_title" msgid="1995971416871498179">"دانلود برای شبکه اپراتور بسیار بزرگ است"</string>
<string name="wifi_required_body" msgid="3067694630143784449">"برای تکمیل این دانلود <xliff:g id="SIZE">%s </xliff:g> باید از Wi-Fi استفاده کنید. در اتصال بعدی به شبکه Wi-Fi و برای شروع دانلود، "\n\n"لمس<xliff:g id="QUEUE_TEXT">%s </xliff:g> کنید."</string>
<string name="wifi_recommended_title" msgid="7441589306734687400">"برای دانلود در فرصتی دیگر در صف گذاشته شود؟"</string>
- <string name="wifi_recommended_body" msgid="1314735166699936073">"شروع دانلود <xliff:g id="SIZE">%s </xliff:g> سبب کم شدن طول عمر باتری و/یا استفاده بیش از حد از اتصال داده تلفن همراه میشود که بسته به قرارداد ارائه داده شما ممکن است از طرف اپراتور تلفن هزینه‌هایی برای شما در نظر گرفته شود. "\n\n"<xliff:g id="QUEUE_TEXT">%s</xliff:g> را لمس کنید تا در اتصال بعدی به شبکه Wi-Fi، این دانلود شروع شود."</string>
+ <string name="wifi_recommended_body" msgid="1314735166699936073">"شروع دانلود <xliff:g id="SIZE">%s </xliff:g> سبب کم شدن طول عمر باتری و/یا استفاده بیش از حد از اتصال داده تلفن همراه می‌شود که بسته به قرارداد ارائه داده شما ممکن است از طرف اپراتور تلفن هزینه‌هایی برای شما در نظر گرفته شود. "\n\n"<xliff:g id="QUEUE_TEXT">%s</xliff:g> را لمس کنید تا در اتصال بعدی به شبکه Wi-Fi، این دانلود شروع شود."</string>
<string name="button_queue_for_wifi" msgid="422576726189179221">"صف"</string>
<string name="button_cancel_download" msgid="2430166148737975604">"لغو"</string>
<string name="button_start_now" msgid="792123674007840864">"اکنون شروع"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"۱ فایل در حال دانلود"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> فایل در حال دانلود"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"۱ فایل در انتظار"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> فایل در انتظار"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> باقیمانده"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"فایل باز نمی‌شود"</string>
</resources>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 605b0df2..d0d0aaa5 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Käytä kaikkia järjestelmän latauksia"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Antaa sovelluksen tarkastella ja muokata kaikkia minkä tahansa järjestelmän sovelluksen käynnistämiä latauksia."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Nimetön&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" ja <xliff:g id="NUMBER">%d</xliff:g> muuta"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Lataus valmis."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Lataus epäonnistui."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Lataa wifi-yhteydellä"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Peruuta"</string>
<string name="button_start_now" msgid="792123674007840864">"Aloita nyt"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 tiedostoa ladataan"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> tiedostoa ladataan"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 tiedosto odottaa"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> tiedostoa odottaa"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> jäljellä"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Tiedostoa ei voi avata"</string>
</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index e41abc2b..c0333e73 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Accéder à tous les téléchargements système"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permet à l\'application d\'afficher et de modifier tous les téléchargements initiés par n\'importe quelle application du système."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sans_titre&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" et <xliff:g id="NUMBER">%d</xliff:g> autres"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Téléchargement terminé."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Échec du téléchargement."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Taille du fichier requiert Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Annuler"</string>
<string name="button_start_now" msgid="792123674007840864">"Commencer"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Téléchargement d\'un fichier"</item>
+ <item quantity="other" msgid="9087228371320573153">"Téléchargement de <xliff:g id="NUMBER">%d</xliff:g> fichiers"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fichier en attente"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> fichiers en attente"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Temps restant : <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Impossible d\'ouvrir le fichier."</string>
</resources>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 66d89eb6..3c701ebe 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -27,14 +27,12 @@
<string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"SD कार्ड के लिए सभी डाउनलोड देखें"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"इस बात पर ध्यान दिए बिना कि किस एप्लिकेशन ने उन्हें डाउनलोड किया है, एप्लिकेशन को SD कार्ड पर किए गए सभी डाउनलोड देखने देता है."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"डाउनलोड कैश में स्थान सुरक्षित रखें"</string>
- <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"एप्लिकेशन को डाउनलोड संचय पर फ़ाइलें डाउनलोड करने देता है, जिन्हें स्वचालित रूप से तब हटाया नहीं जा सकता, जब डाउनलोड प्रबंधक को अधिक स्थान की आवश्‍यकता होती है."</string>
+ <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"एप्लिकेशन को डाउनलोड संचय पर फ़ाइलें डाउनलोड करने देता है, जिन्हें अपने आप तब हटाया नहीं जा सकता, जब डाउनलोड प्रबंधक को अधिक स्थान की आवश्‍यकता होती है."</string>
<string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"बिना सूचना के फ़ाइलें डाउनलोड करें"</string>
<string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"उपयोगकर्ता को कोई भी सूचना दिखाए बिना एप्‍लिकेशन को डाउनलोड प्रबंधक द्वारा फ़ाइलें डाउनलोड करने देता है."</string>
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"सभी सिस्‍टम डाउनलोड में पहुंच प्राप्त करें"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"एप्लिकेशन को सिस्टम पर किसी भी एप्लिकेशन द्वारा शुरू किए गए सभी डाउनलोड देखने और संशोधित करने देता है."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;शीर्षक-रहित&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" और <xliff:g id="NUMBER">%d</xliff:g> अधिक"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"डाउनलोड पूर्ण."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"डाउनलोड विफल."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"डाउनलोड आकार हेतु Wi-Fi आवश्‍यक."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"रद्द करें"</string>
<string name="button_start_now" msgid="792123674007840864">"अब प्रारंभ करें"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 फ़ाइल डाउनलोड हो रही है"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> फ़ाइलें डाउनलोड हो रही हैं"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 फ़ाइल प्रतीक्षा में है"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> फ़ाइलें प्रतीक्षा में हैं"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> शेष"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"फ़ाइल नहीं खोली जा सकती"</string>
</resources>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index eddac6a6..d436c1a3 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Pristup svim preuzimanjima sustava"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Omogućuje aplikaciji prikaz i izmjenu svih preuzimanja koja je pokrenula bilo koja aplikacija u sustavu."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Bez naslova&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" i još <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Preuzimanje je dovršeno."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Preuzimanje nije uspjelo."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Veličina zahtijeva Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Odustani"</string>
<string name="button_start_now" msgid="792123674007840864">"Započni sad"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Preuzimanje 1 datoteke"</item>
+ <item quantity="other" msgid="9087228371320573153">"Preuzimanje datoteka (<xliff:g id="NUMBER">%d</xliff:g>)"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 datoteka na čekanju"</item>
+ <item quantity="other" msgid="549229034166062887">"Datoteke na čekanju (<xliff:g id="NUMBER">%d</xliff:g>)"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Još <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Datoteka se ne može otvoriti"</string>
</resources>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index f37b4c0d..3fcad47c 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Hozzáférés a rendszer összes letöltéséhez"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Az alkalmazás megnézheti és módosíthatja a rendszer bármelyik alkalmazása által kezdeményezett letöltést."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Névtelen&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" és további <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"A letöltés befejeződött."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"A letöltés nem sikerült."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"A letöltéshez Wi-Fi kell"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Mégse"</string>
<string name="button_start_now" msgid="792123674007840864">"Indítás most"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 fájl letöltése folyamatban"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> fájl letöltése folyamatban"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fájl várakozik"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> fájl várakozik"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> van hátra"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"A fájlt nem lehet megnyitni."</string>
</resources>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 29cd3f29..8ef68cd7 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -26,15 +26,13 @@
<string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Lihat semua unduhan pada penyimpanan USB"</string>
<string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Melihat semua unduhan pada kartu SD"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Mengizinkan apl melihat semua unduhan ke kartu SD, terlepas apl apa yang mengunduhnya."</string>
- <string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Ruang penyimpanan dalam tembolok unduhan"</string>
- <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Mengizinkan apl mengunduh file ke tembolok unduhan yang tidak dapat dihapus secara otomatis saat pengelola unduhan memerlukan lebih banyak ruang."</string>
+ <string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Ruang penyimpanan dalam cache unduhan"</string>
+ <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Mengizinkan apl mengunduh file ke cache unduhan yang tidak dapat dihapus secara otomatis saat pengelola unduhan memerlukan lebih banyak ruang."</string>
<string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"unduh file tanpa pemberitahuan"</string>
<string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Mengizinkan apl mengunduh file melalui pengelola unduhan tanpa menampilkan pemberitahuan apa pun kepada pengguna."</string>
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Akses semua unduhan sistem"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Mengizinkan apl melihat dan memodifikasi semua unduhan yang dimulai oleh apl apa pun pada sistem."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Tanpa judul&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" dan <xliff:g id="NUMBER">%d</xliff:g> lainnya"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Unduhan selesai."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Unduhan gagal."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Ukuran unduhan memerlukan Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Batal"</string>
<string name="button_start_now" msgid="792123674007840864">"Mulai sekarang"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Mengunduh 1 file"</item>
+ <item quantity="other" msgid="9087228371320573153">"Mengunduh <xliff:g id="NUMBER">%d</xliff:g> file"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 file menunggu"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> file menunggu"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> lagi"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Tidak dapat membuka file"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index bffa21ec..05eef883 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Accesso a tutti i dowload di sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Consente all\'applicazione di visualizzare e modificare tutti i download avviati da qualsiasi applicazione sul sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Senza nome&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" e <xliff:g id="NUMBER">%d</xliff:g> altri"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Download completato."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Download non riuscito."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Wi-Fi richiesto per download"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Annulla"</string>
<string name="button_start_now" msgid="792123674007840864">"Avvia adesso"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 file in download"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> file in download"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 file in attesa"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> file in attesa"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> rimanenti"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Impossibile aprire il file"</string>
</resources>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 132ead4e..1a05a6bf 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"גישה לכל הורדות המערכת"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"מאפשר ליישום להציג ולשנות את כל ההורדות שהופעלו על ידי יישום כלשהו במערכת."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;ללא כותרת&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" ועוד <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"ההורדה הסתיימה."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"ההורדה נכשלה."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"גודל ההורדה מחייב חיבור Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"ביטול"</string>
<string name="button_start_now" msgid="792123674007840864">"התחל כעת"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"מתבצעת הורדה של קובץ אחד"</item>
+ <item quantity="other" msgid="9087228371320573153">"מתבצעת הורדה של <xliff:g id="NUMBER">%d</xliff:g> קבצים"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"קובץ אחד ממתין"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> קבצים ממתינים"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> נותרו"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"לא ניתן לפתוח את הקובץ"</string>
</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index b6a3e7ea..55101486 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"すべてのシステムダウンロードにアクセス"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"システム上の任意のアプリにより開始されたすべてのダウンロードの表示と変更をアプリに許可します。"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;無題&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">"、 "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" その他<xliff:g id="NUMBER">%d</xliff:g>件"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"ダウンロードが完了しました。"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"ダウンロードできませんでした。"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Wi-Fi必須のサイズです。"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"キャンセル"</string>
<string name="button_start_now" msgid="792123674007840864">"今すぐ開始"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1ファイルをダウンロード中"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g>ファイルをダウンロード中"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1ファイルがダウンロード待ち"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g>ファイルがダウンロード待ち"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"残り<xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"ファイルを開くことができません"</string>
</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 8dbdf61c..df66b3eb 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"모든 시스템 다운로드에 액세스"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"시스템에 설치된 모든 앱에서 다운로드한 항목을 앱이 보고 수정할 수 있도록 허용합니다."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;제목 없음&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" 외 <xliff:g id="NUMBER">%d</xliff:g>개"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"다운로드가 완료되었습니다."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"다운로드에 실패했습니다."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"크기가 너무 커서 Wi-Fi로 다운로드해야 합니다."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"취소"</string>
<string name="button_start_now" msgid="792123674007840864">"지금 시작"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1개의 파일 다운로드 중"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g>개의 파일 다운로드 중"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1개의 파일 대기 중"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g>개의 파일 대기 중"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> 남음"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"파일을 열 수 없음"</string>
</resources>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index df083475..9c3318de 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Pasiekti visus sistemos atsisiuntimus"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Leidžiama programai žiūrėti ir keisti visus atsisiuntimus, pradėtus naudojant bet kokią sistemos programą."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Be pavadinimo&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" ir dar <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Atsisiuntimas baigtas."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Atsisiuntimas nesėkmingas."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Did. f., reikia „Wi-Fi“."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Atšaukti"</string>
<string name="button_start_now" msgid="792123674007840864">"Pradėti dabar"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Atsisiunčiama failų: 1"</item>
+ <item quantity="other" msgid="9087228371320573153">"Atsisiunčiama failų: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Laukiama failų: 1"</item>
+ <item quantity="other" msgid="549229034166062887">"Laukiama failų: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Liko: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Nepavyksta atidaryti failo"</string>
</resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 322c2819..47c0be20 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Piekļuve visām sistēmas lejupielādēm"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Ļauj lietotnei skatīt un pārveidot visas lejupielādes, kas veiktas, izmantojot jebkuru sistēmas lietotni."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Bez nosaukuma&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" un vēl <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Lejupielāde ir pabeigta."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Lejupielāde neizdevās."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Lejupiel. nepiec. Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Atcelt"</string>
<string name="button_start_now" msgid="792123674007840864">"Sākt tūlīt"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Notiek 1 faila lejupielāde"</item>
+ <item quantity="other" msgid="9087228371320573153">"Notiek <xliff:g id="NUMBER">%d</xliff:g> failu lejupielāde"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Rindā: 1 fails"</item>
+ <item quantity="other" msgid="549229034166062887">"Rindā: <xliff:g id="NUMBER">%d</xliff:g> faili"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Atlikušais laiks: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Nevar atvērt failu"</string>
</resources>
diff --git a/res/values-ms/strings.xml b/res/values-ms/strings.xml
index fb92ac78..3d39b8bd 100644
--- a/res/values-ms/strings.xml
+++ b/res/values-ms/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Mengakses semua muat turun sistem"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Membenarkan aplikasi untuk melihat dan mengubah suai semua muat turun yang dimulakan oleh mana-mana aplikasi pada sistem."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Tidak bertajuk&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" dan <xliff:g id="NUMBER">%d</xliff:g> lagi"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Muat turun selesai."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Muat turun tidak berjaya."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Saiz m.trn perlukn Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Batal"</string>
<string name="button_start_now" msgid="792123674007840864">"Mulakan sekarang"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 fail sedang dimuat turun"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> fail sedang dimuat turun"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fail sedang menunggu"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> fail sedang menunggu"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> tinggal"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Tidak dapat membuka fail"</string>
</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 985e9f7d..f621af69 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -23,18 +23,16 @@
<string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Gir appen adgang til avanserte funksjoner i nedlastingsbehandlingen. Skadelig programvare kan bruke dette til å forstyrre nedlastinger og få tilgang til privat informasjon."</string>
<string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"Sende nedlastingsvarslinger"</string>
<string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Gir appen tillatelse til å sende varslinger om fullførte nedlastinger. Skadelig programvare kan bruke dette til å forstyrre andre programmer som laster ned filer."</string>
- <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Vis nedl. til USB-lagring"</string>
- <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Vis alle nedlastinger til minnekort"</string>
+ <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Se nedlastinger til USB-lagr."</string>
+ <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Se alle nedlastinger til minnekort"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Gir appen tilgang til alle nedlastinger på SD-kortet, uavhengig av hvilken app som lastet dem ned."</string>
- <string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Reserver lagringsplass i nedlastingsbufferen"</string>
+ <string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Reservere lagringsplass i nedlastingsbufferen"</string>
<string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Gir appen tillatelse til å laste ned filer til nedlastingsbufferen, slik at de ikke slettes automatisk når nedlastingsbehandlingen trenger mer lagringsplass."</string>
- <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"last ned filer uten varsling"</string>
+ <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"laste ned filer uten varsling"</string>
<string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Gir appen tillatelse til å laste ned filer via nedlastingsbehandlingen uten at brukeren varsles."</string>
- <string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Tilgang til alle systemnedlastinger"</string>
+ <string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Se alle systemnedlastinger"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Gir appen tillatelse til å se og endre alle nedlastinger uansett hvilken systemapp som har startet nedlastingene."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Uten navn&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" og <xliff:g id="NUMBER">%d</xliff:g> til"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Nedlasting fullført."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Nedlasting mislyktes."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Krever Wi-Fi pga. størr."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Avbryt"</string>
<string name="button_start_now" msgid="792123674007840864">"Start nå"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 fil lastes ned"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> filer lastes ned"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fil venter"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> filer venter"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> gjenstår"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Kan ikke åpne filen"</string>
</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 63634541..bab68bb2 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Toegang geven tot alle systeemdownloads"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Hiermee kan de app alle downloads bekijken en wijzigen die door een systeemapp zijn gestart."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Zonder titel&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" en nog <xliff:g id="NUMBER">%d</xliff:g> meer"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Downloaden is voltooid."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Downloaden is mislukt."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Wifi nodig voor download"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Annuleren"</string>
<string name="button_start_now" msgid="792123674007840864">"Nu starten"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Er wordt 1 bestand gedownload"</item>
+ <item quantity="other" msgid="9087228371320573153">"Er worden <xliff:g id="NUMBER">%d</xliff:g> bestanden gedownload"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 bestand in de wachtrij"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> bestanden in de wachtrij"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> resterend"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Kan bestand niet openen"</string>
</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 5f15f993..a02ef5c5 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Dostęp do wszystkich pobranych pozycji w systemie"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Zezwala aplikacji na wyświetlanie i modyfikowanie wszystkich plików pobranych w dowolnej aplikacji w systemie."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Bez nazwy&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" i inne (<xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Pobieranie ukończone."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Pobranie nie powiodło się."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Pobieranie wymaga Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Anuluj"</string>
<string name="button_start_now" msgid="792123674007840864">"Rozpocznij teraz"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Pobieram 1 plik"</item>
+ <item quantity="other" msgid="9087228371320573153">"Pobieram <xliff:g id="NUMBER">%d</xliff:g> pliki(ów)"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Czeka 1 plik"</item>
+ <item quantity="other" msgid="549229034166062887">"Oczekujące pliki: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Pozostało: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Nie można otworzyć pliku"</string>
</resources>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index 4d22341e..9f9869dc 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Aceder a todas as transferências do sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permite que a aplicação veja e modifique todas as transferências iniciadas por qualquer aplicação no sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sem nome&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" e mais <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Transferência concluída."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Falha na transferência."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Tam. transf. exige wifi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancelar"</string>
<string name="button_start_now" msgid="792123674007840864">"Começar agora"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 ficheiro a ser transferido"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> ficheiros a serem transferidos"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 ficheiro em espera"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> ficheiros em espera"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Faltam <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Não é possível abrir o ficheiro"</string>
</resources>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index d567fd8e..f4b47071 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Acessar todos os downloads do sistema"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permite que o aplicativo visualize e modifique todos os downloads iniciados por qualquer aplicativo no sistema."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Sem título&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" e <xliff:g id="NUMBER">%d</xliff:g> mais"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Download concluído."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Falha no download."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"O tamanho do download requer Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Cancelar"</string>
<string name="button_start_now" msgid="792123674007840864">"Iniciar agora"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Fazendo download de 1 arquivo"</item>
+ <item quantity="other" msgid="9087228371320573153">"Fazendo download de <xliff:g id="NUMBER">%d</xliff:g> arquivos"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 arquivo em espera"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> arquivos em espera"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> restantes"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Não é possível abrir o arquivo"</string>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 78c3692b..2bd33c95 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Accesaţi toate descărcările din sistem"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Permite aplicaţiei să vizualizeze şi să modifice toate descărcările iniţiate de orice aplicaţie din sistem."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Fără titlu&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" şi încă <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Descărcare finalizată."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Descărcare nereuşită."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Dimen. desc. nec. Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Anulaţi"</string>
<string name="button_start_now" msgid="792123674007840864">"Începeţi acum"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Se descarcă un fişier"</item>
+ <item quantity="other" msgid="9087228371320573153">"Se descarcă <xliff:g id="NUMBER">%d</xliff:g> (de) fişiere"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Un fişier în aşteptare"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> (de) fişiere în aşteptare"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Timp rămas: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Fişierul nu poate fi deschis"</string>
</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 58ea71e5..8e20cf3a 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -28,13 +28,11 @@
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Приложение получит доступ ко всем загрузкам на SD-карте независимо от того, через какое ПО они были загружены."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Резервировать место в кэше загрузки"</string>
<string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Приложение сможет загружать файлы в кэш загрузки (который не может быть автоматически очищен), если менеджеру загрузки потребуется больше места."</string>
- <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"загружать файлы без оповещения"</string>
+ <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"Загрузка файлов без оповещения"</string>
<string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Приложение сможет загружать файлы через диспетчер загрузок без уведомления пользователя."</string>
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Доступ ко всем загрузкам"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Приложение сможет открывать и изменять загрузки независимо от того, через какое ПО они были загружены."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;без названия&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" и ещё <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Загрузка завершена."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Не удалось загрузить файл."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Загрузка только по Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Отмена"</string>
<string name="button_start_now" msgid="792123674007840864">"Запустить"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Загрузка 1 файла…"</item>
+ <item quantity="other" msgid="9087228371320573153">"Загрузка <xliff:g id="NUMBER">%d</xliff:g> файлов…"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Ожидается загрузка 1 файла"</item>
+ <item quantity="other" msgid="549229034166062887">"Ожидается загрузка <xliff:g id="NUMBER">%d</xliff:g> файлов"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Осталось: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Не удается открыть файл"</string>
</resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 78bd63e9..1bb1b5e3 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Prístup ku všetkým systémovým prevzatiam"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Umožňuje aplikácii zobraziť a upravovať všetky preberania spustené ľubovoľnou aplikáciou v systéme."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Bez názvu&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" a ďalšie (<xliff:g id="NUMBER">%d</xliff:g>)"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Preberanie dokončené."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Preberanie bolo neúspešné."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Vzhľadom na veľkosť preberaného súboru sa vyžaduje pripojenie Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Zrušiť"</string>
<string name="button_start_now" msgid="792123674007840864">"Spustiť"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Preberá sa 1 súbor"</item>
+ <item quantity="other" msgid="9087228371320573153">"Počet preberaných súborov: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 čakajúci súbor"</item>
+ <item quantity="other" msgid="549229034166062887">"Počet čakajúcich súborov: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Zostáva: <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Súbor sa nepodarilo otvoriť"</string>
</resources>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 37d226c8..90f766b1 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Dostop do vseh sistemskih prenosov"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Dovoli programu prikaz in spreminjanje vseh prenosov, ki jih je začel poljubni program v sistemu."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Brez naslova&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" in dodatnih <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Prenos je končan."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Prenos ni uspel."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Zahtev. je povez. Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Prekliči"</string>
<string name="button_start_now" msgid="792123674007840864">"Začni zdaj"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Poteka prenos 1 datoteke"</item>
+ <item quantity="other" msgid="9087228371320573153">"Poteka prenos toliko datotek: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Na čakanju je 1 datoteka"</item>
+ <item quantity="other" msgid="549229034166062887">"Št. datotek na čakanju: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Še <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Datoteke ni mogoče odpreti"</string>
</resources>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index b9636962..b63d417f 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Приступи свим системским преузимањима"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Омогућава апликацији да прегледа и мења сва преузимања која је покренула било која апликација у систему."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Без наслова&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" и још <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Преузимање је завршено."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Преузимање није успело."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Величина ставке захтева Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Откажи"</string>
<string name="button_start_now" msgid="792123674007840864">"Започни одмах"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Преузима се 1 датотека"</item>
+ <item quantity="other" msgid="9087228371320573153">"Преузимају се датотеке (<xliff:g id="NUMBER">%d</xliff:g>)"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Чека се 1 датотека"</item>
+ <item quantity="other" msgid="549229034166062887">"Чекају се датотеке (<xliff:g id="NUMBER">%d</xliff:g>)"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Још <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Није могуће отворити датотеку"</string>
</resources>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index e9b0852b..927de7b5 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Åtkomst till alla hämtade filer i systemet"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Tillåter att appen visar och ändrar alla hämtningar som initieras av en app i systemet."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Okänd&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" och <xliff:g id="NUMBER">%d</xliff:g> till"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Hämtningen har slutförts."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Det gick inte att hämta."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Hämtningen kräver Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Avbryt"</string>
<string name="button_start_now" msgid="792123674007840864">"Starta nu"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g> <xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 fil hämtas"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> filer hämtas"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 fil väntar"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> filer väntar"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> återstår"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Det går inte att öppna filen"</string>
</resources>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index 3fcf9c04..89ea1a11 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Fikia vipakuzi vyote vya mfumo"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Inaruhusu programu kuona na kurekebisha vipakuzi vyote vilivyoanzishwa na programu yoyote kwenye mfumo."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Haina Kichwa&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" na <xliff:g id="NUMBER">%d</xliff:g> zaidi"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Upakuaji umekamilika"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Kupakua hakujafaulu."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Ukubwa wa kipakuzi uhitaji Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Ghairi"</string>
<string name="button_start_now" msgid="792123674007840864">"Anza sasa"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Faili 1 inapakua"</item>
+ <item quantity="other" msgid="9087228371320573153">"Faili <xliff:g id="NUMBER">%d</xliff:g> zinapakua"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Faili 1 inasubiri"</item>
+ <item quantity="other" msgid="549229034166062887">"Faili <xliff:g id="NUMBER">%d</xliff:g> zinasubiri"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> zinazosalia"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Haiwezi kufungua faili"</string>
</resources>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index b5be9052..3f19fb60 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"เข้าถึงดาวน์โหลดทั้งหมดของระบบ"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"อนุญาตให้แอปพลิเคชันนี้ดูและแก้ไขรายการดาวน์โหลดทั้งหมดของทุกแอปพลิเคชันในระบบ"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;ไม่มีชื่อ&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" และอีก <xliff:g id="NUMBER">%d</xliff:g> รายการ"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"ดาวน์โหลดเสร็จสมบูรณ์"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"ดาวน์โหลดไม่สำเร็จ"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"ต้องใช้ WiFi ดาวน์โหลด"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"ยกเลิก"</string>
<string name="button_start_now" msgid="792123674007840864">"เริ่มต้นเดี๋ยวนี้"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"กำลังดาวน์โหลด 1 ไฟล์"</item>
+ <item quantity="other" msgid="9087228371320573153">"กำลังดาวน์โหลด <xliff:g id="NUMBER">%d</xliff:g> ไฟล์"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"กำลังรอ 1 ไฟล์"</item>
+ <item quantity="other" msgid="549229034166062887">"กำลังรอ <xliff:g id="NUMBER">%d</xliff:g> ไฟล์"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"เหลืออีก <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"ไม่สามารถเปิดไฟล์ได้"</string>
</resources>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index f4d970de..1d19dc24 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"I-access ang lahat ng mga pag-download ng system"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Pinapayagan ang app na tingnan at baguhin ang lahat ng download na sinimulan ng anumang app sa system."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Walang pamagat&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" at <xliff:g id="NUMBER">%d</xliff:g> pa"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Kumpleto na ang download."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Hindi matagumpay ang pag-download."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Kailangan ng laki ng download ng Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Kanselahin"</string>
<string name="button_start_now" msgid="792123674007840864">"Magsimula ngayon"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 file ang dina-download"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> (na) file ang dina-download"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 file ang hinihintay"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> (na) file ang hinihintay"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> ang natitira"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Hindi mabuksan ang file"</string>
</resources>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index ece86bd4..915eb758 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -23,7 +23,7 @@
<string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Uygulamaya, indirme yöneticisinin gelişmiş fonksiyonlarına erişme izni verir. Zararlı uygulamalar indirme işlemlerini kesmek ve özel bilgilere erişmek için bunu kullanabilir."</string>
<string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"İndirme bildirimleri gönder."</string>
<string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Uygulamaya, tamamlanan indirme işlemleriyle ilgili bildirim gönderme izni verir. Zararlı uygulamalar dosya indiren diğer uygulamaların çalışma biçimini etkilemek için bunu kullanabilir."</string>
- <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"USB dp brmne yapln tüm indr göst"</string>
+ <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"USB belleğe yapln tüm indr göster"</string>
<string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"SD karta yapılan tüm indirmeleri gör"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Uygulamaya, indiren uygulamadan bağımsız olarak, SD karta yapılan tüm indirme işlemlerini görme izni verir."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"İndirme önbelleğinde alan ayır"</string>
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Tüm sistem indirmelerine erişim"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Uygulamaya, sistemdeki herhangi bir uygulama tarafından başlatılan tüm indirme işlemlerini görüntüleme ve değiştirme izni verir."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Adsız&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" ve <xliff:g id="NUMBER">%d</xliff:g> adet daha"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"İndirme işlemi tamamlandı."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"İndirme işlemi başarısız oldu."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"İndirme boyutu Kablosuz bağlantı gerektiriyor."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"İptal"</string>
<string name="button_start_now" msgid="792123674007840864">"Şimdi başlat"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="PERCENT">%%</xliff:g><xliff:g id="NUMBER">%d</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 dosya indiriliyor"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> dosya indiriliyor"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 dosya bekliyor"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> dosya bekliyor"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> kaldı"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Dosya açılamıyor"</string>
</resources>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 08a703f2..94b4a71a 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Отримувати доступ до всіх завантажень у системі"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Дозволяє програмі переглядати та змінювати всі завантаження, ініційовані будь-якою програмою в системі."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Без назви&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" і ще <xliff:g id="NUMBER">%d</xliff:g>"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Завантаження закінчено."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Завантаження не виконано."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Для завант.потрібен WiFi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Скасувати"</string>
<string name="button_start_now" msgid="792123674007840864">"Почати зараз"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Завантажується 1 файл"</item>
+ <item quantity="other" msgid="9087228371320573153">"Завантажуються файли: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"Очікує 1 файл"</item>
+ <item quantity="other" msgid="549229034166062887">"Очікують файли: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Залишилося <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Неможливо відкрити файл"</string>
</resources>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index ff6aeb22..d73ba6cc 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Truy cập tất cả các bản tải xuống trong hệ thống"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"Cho phép ứng dụng xem và sửa đổi tất cả các bản tải xuống được khởi tạo bởi bất kỳ ứng dụng nào trên hệ thống."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Không có tiêu đề&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" và <xliff:g id="NUMBER">%d</xliff:g> mục khác"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Tải xuống hoàn tất."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Tải xuống không thành công."</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Yêu cầu Wi-Fi."</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Hủy"</string>
<string name="button_start_now" msgid="792123674007840864">"Bắt đầu ngay bây giờ"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"Đang tải xuống 1 tệp"</item>
+ <item quantity="other" msgid="9087228371320573153">"Đang tải xuống <xliff:g id="NUMBER">%d</xliff:g> tệp"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 tệp đang chờ tải xuống"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> tệp đang chờ tải xuống"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"Còn lại <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Không thể mở tệp"</string>
</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index 2197fe79..8345823d 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="3658948994665187911">"下载管理器"</string>
+ <string name="app_label" msgid="3658948994665187911">"下载管理程序"</string>
<string name="permlab_downloadManager" msgid="7779544811202855500">"访问下载管理器。"</string>
<string name="permdesc_downloadManager" msgid="4237406545998908947">"允许该应用使用下载管理器并通过它下载文件。恶意应用可能会借此中断下载并访问私人信息。"</string>
<string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"高级下载管理器功能。"</string>
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"访问所有系统下载内容"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"允许该应用查看和修改系统上的任意应用下载的所有内容。"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;未命名&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" 还有 <xliff:g id="NUMBER">%d</xliff:g> 项"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"下载已完成。"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"下载失败。"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"文件过大,需要通过 Wi-Fi 下载。"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"取消"</string>
<string name="button_start_now" msgid="792123674007840864">"立即开始"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"正在下载 1 个文件"</item>
+ <item quantity="other" msgid="9087228371320573153">"正在下载 <xliff:g id="NUMBER">%d</xliff:g> 个文件"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"正在等待下载 1 个文件"</item>
+ <item quantity="other" msgid="549229034166062887">"正在等待下载 <xliff:g id="NUMBER">%d</xliff:g> 个文件"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"剩余时间:<xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"无法打开文件"</string>
</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 1735e4dc..15e2ccba 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"存取所有系統下載內容"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"允許應用程式檢視及修改系統上任一應用程式下載的所有內容。"</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;未命名&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" 以及其他 <xliff:g id="NUMBER">%d</xliff:g> 個"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"下載完成。"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"下載失敗。"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"這個檔案較大,需要透過 Wi-Fi 下載。"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"取消"</string>
<string name="button_start_now" msgid="792123674007840864">"立即開始"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"正在下載 1 個檔案"</item>
+ <item quantity="other" msgid="9087228371320573153">"正在下載 <xliff:g id="NUMBER">%d</xliff:g> 個檔案"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"正在等待下載 1 個檔案"</item>
+ <item quantity="other" msgid="549229034166062887">"正在等待下載 <xliff:g id="NUMBER">%d</xliff:g> 個檔案"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"剩餘 <xliff:g id="DURATION">%s</xliff:g>"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"無法開啟檔案"</string>
</resources>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 04962dc3..07bec1c7 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -33,8 +33,6 @@
<string name="permlab_accessAllDownloads" msgid="2436240495424393717">"Finyelela kuko konke ukulanda kwesistimu"</string>
<string name="permdesc_accessAllDownloads" msgid="1871832254578267128">"vumela insiza ukuthi ibone iphinde iguqule konke okulayishiwe okuqalwe insiza ekwisistimu."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Akunasihloko&gt;"</string>
- <string name="notification_filename_separator" msgid="7147189522857807618">", "</string>
- <string name="notification_filename_extras" msgid="5549729917695688191">" nokungu-<xliff:g id="NUMBER">%d</xliff:g> okungaphezulu"</string>
<string name="notification_download_complete" msgid="5443563299253103667">"Ukulayisha ungenisa kuqedile"</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Ukulayisha akuphumelelanga"</string>
<string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Usayizi wokulanda udinga i-Wi-Fi"</string>
@@ -47,4 +45,14 @@
<string name="button_cancel_download" msgid="2430166148737975604">"Khansela"</string>
<string name="button_start_now" msgid="792123674007840864">"Qala manje"</string>
<string name="download_percent" msgid="6889426633242976698">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
+ <plurals name="notif_summary_active">
+ <item quantity="one" msgid="8475775855911967027">"1 ifayela elilandwayo"</item>
+ <item quantity="other" msgid="9087228371320573153">"<xliff:g id="NUMBER">%d</xliff:g> amafayela alandwayo"</item>
+ </plurals>
+ <plurals name="notif_summary_waiting">
+ <item quantity="one" msgid="5537481763963544278">"1 ifayela elilindiwe"</item>
+ <item quantity="other" msgid="549229034166062887">"<xliff:g id="NUMBER">%d</xliff:g> amafayela alindile"</item>
+ </plurals>
+ <string name="download_remaining" msgid="3139295890887972718">"<xliff:g id="DURATION">%s</xliff:g> esisele"</string>
+ <string name="download_no_application_title" msgid="7935659741162801699">"Ayikwazi ukuvula ifayela"</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 56352951..3a060e2d 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -116,23 +116,6 @@
for a download that doesn't have a title associated with it. -->
<string name="download_unknown_title">&lt;Untitled&gt;</string>
- <!-- When there are multiple simultaneous outstanding downloads from a
- single application, they are displayed as a single notification,
- and the expanded notification view displays the first two download
- names separated with this string, i.e. "[title], [title]"
- or "[title], [title] and [n] more". This is the comma + space
- that separates the first two titles, and it's used both when there
- are exactly two and more than two titles. -->
- <string name="notification_filename_separator">", "</string>
-
- <!-- When there are three or more simultaneous outstanding downloads from a
- single application, they are displayed as a single notification,
- and the expanded notification view uses this string to indicate
- downloads beyond the first two, i.e. "[title], [title] and [n] more".
- This is the " and [n] more" part, including the leading space, and it's
- used regardless of the number of additional downloads. -->
- <string name="notification_filename_extras">" and <xliff:g id="number" example="27">%d</xliff:g> more"</string>
-
<!-- When a download completes, a notification is displayed, and this
string is used to indicate that the download successfully completed.
Note that such a download could have been initiated by a variety of
@@ -210,4 +193,24 @@
<!-- Short representation of download progress percentage. [CHAR LIMIT=8] -->
<string name="download_percent"><xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g></string>
+ <!-- Title summarizing active downloads. [CHAR LIMIT=32] -->
+ <plurals name="notif_summary_active">
+ <item quantity="one">1 file downloading</item>
+ <item quantity="other"><xliff:g id="number">%d</xliff:g> files downloading</item>
+ </plurals>
+
+ <!-- Title summarizing waiting downloads. [CHAR LIMIT=32] -->
+ <plurals name="notif_summary_waiting">
+ <item quantity="one">1 file waiting</item>
+ <item quantity="other"><xliff:g id="number">%d</xliff:g> files waiting</item>
+ </plurals>
+
+ <!-- Time remaining until download is complete. [CHAR LIMIT=32] -->
+ <string name="download_remaining"><xliff:g id="duration" example="3 minutes">%s</xliff:g> left</string>
+
+ <!-- Text for a toast appearing when a user clicks on a completed download, informing the user
+ that there is no application on the device that can open the file that was downloaded
+ [CHAR LIMIT=200] -->
+ <string name="download_no_application_title">Can\'t open file</string>
+
</resources>
diff --git a/src/com/android/providers/downloads/Constants.java b/src/com/android/providers/downloads/Constants.java
index 8481435f..8d806182 100644
--- a/src/com/android/providers/downloads/Constants.java
+++ b/src/com/android/providers/downloads/Constants.java
@@ -75,6 +75,8 @@ public class Constants {
/** The default extension for binary files if we can't get one at the HTTP level */
public static final String DEFAULT_DL_BINARY_EXTENSION = ".bin";
+ public static final String PROVIDER_PACKAGE_NAME = "com.android.providers.downloads";
+
/**
* When a number has to be appended to the filename, this string is used to separate the
* base filename from the sequence number
diff --git a/src/com/android/providers/downloads/DownloadHandler.java b/src/com/android/providers/downloads/DownloadHandler.java
index 29d34700..2f02864e 100644
--- a/src/com/android/providers/downloads/DownloadHandler.java
+++ b/src/com/android/providers/downloads/DownloadHandler.java
@@ -18,6 +18,9 @@ package com.android.providers.downloads;
import android.content.res.Resources;
import android.util.Log;
+import android.util.LongSparseArray;
+
+import com.android.internal.annotations.GuardedBy;
import java.util.ArrayList;
import java.util.HashMap;
@@ -25,31 +28,37 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
public class DownloadHandler {
-
private static final String TAG = "DownloadHandler";
+
+ @GuardedBy("this")
private final LinkedHashMap<Long, DownloadInfo> mDownloadsQueue =
new LinkedHashMap<Long, DownloadInfo>();
+ @GuardedBy("this")
private final HashMap<Long, DownloadInfo> mDownloadsInProgress =
new HashMap<Long, DownloadInfo>();
- private static final DownloadHandler mDownloadHandler = new DownloadHandler();
+ @GuardedBy("this")
+ private final LongSparseArray<Long> mCurrentSpeed = new LongSparseArray<Long>();
+
private final int mMaxConcurrentDownloadsAllowed = Resources.getSystem().getInteger(
com.android.internal.R.integer.config_MaxConcurrentDownloadsAllowed);
- static DownloadHandler getInstance() {
- return mDownloadHandler;
+ private static final DownloadHandler sDownloadHandler = new DownloadHandler();
+
+ public static DownloadHandler getInstance() {
+ return sDownloadHandler;
}
- synchronized void enqueueDownload(DownloadInfo info) {
+ public synchronized void enqueueDownload(DownloadInfo info) {
if (!mDownloadsQueue.containsKey(info.mId)) {
if (Constants.LOGV) {
Log.i(TAG, "enqueued download. id: " + info.mId + ", uri: " + info.mUri);
}
mDownloadsQueue.put(info.mId, info);
- startDownloadThread();
+ startDownloadThreadLocked();
}
}
- private synchronized void startDownloadThread() {
+ private void startDownloadThreadLocked() {
Iterator<Long> keys = mDownloadsQueue.keySet().iterator();
ArrayList<Long> ids = new ArrayList<Long>();
while (mDownloadsInProgress.size() < mMaxConcurrentDownloadsAllowed && keys.hasNext()) {
@@ -67,21 +76,30 @@ public class DownloadHandler {
}
}
- synchronized boolean hasDownloadInQueue(long id) {
+ public synchronized boolean hasDownloadInQueue(long id) {
return mDownloadsQueue.containsKey(id) || mDownloadsInProgress.containsKey(id);
}
- synchronized void dequeueDownload(long mId) {
- mDownloadsInProgress.remove(mId);
- startDownloadThread();
+ public synchronized void dequeueDownload(long id) {
+ mDownloadsInProgress.remove(id);
+ mCurrentSpeed.remove(id);
+ startDownloadThreadLocked();
if (mDownloadsInProgress.size() == 0 && mDownloadsQueue.size() == 0) {
notifyAll();
}
}
+ public synchronized void setCurrentSpeed(long id, long speed) {
+ mCurrentSpeed.put(id, speed);
+ }
+
+ public synchronized long getCurrentSpeed(long id) {
+ return mCurrentSpeed.get(id, -1L);
+ }
+
// right now this is only used by tests. but there is no reason why it can't be used
// by any module using DownloadManager (TODO add API to DownloadManager.java)
- public synchronized void WaitUntilDownloadsTerminate() throws InterruptedException {
+ public synchronized void waitUntilDownloadsTerminate() throws InterruptedException {
if (mDownloadsInProgress.size() == 0 && mDownloadsQueue.size() == 0) {
if (Constants.LOGVV) {
Log.i(TAG, "nothing to wait on");
diff --git a/src/com/android/providers/downloads/DownloadInfo.java b/src/com/android/providers/downloads/DownloadInfo.java
index e452e5bf..5172b696 100644
--- a/src/com/android/providers/downloads/DownloadInfo.java
+++ b/src/com/android/providers/downloads/DownloadInfo.java
@@ -36,7 +36,6 @@ import android.util.Pair;
import com.android.internal.util.IndentingPrintWriter;
-import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -342,7 +341,7 @@ public class DownloadInfo {
*/
public int checkCanUseNetwork() {
final NetworkInfo info = mSystemFacade.getActiveNetworkInfo(mUid);
- if (info == null) {
+ if (info == null || !info.isConnected()) {
return NETWORK_NO_CONNECTION;
}
if (DetailedState.BLOCKED.equals(info.getDetailedState())) {
@@ -576,4 +575,24 @@ public class DownloadInfo {
StorageManager.getInstance(mContext));
mSystemFacade.startThread(downloader);
}
+
+ /**
+ * Query and return status of requested download.
+ */
+ public static int queryDownloadStatus(ContentResolver resolver, long id) {
+ final Cursor cursor = resolver.query(
+ ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id),
+ new String[] { Downloads.Impl.COLUMN_STATUS }, null, null, null);
+ try {
+ if (cursor.moveToFirst()) {
+ return cursor.getInt(0);
+ } else {
+ // TODO: increase strictness of value returned for unknown
+ // downloads; this is safe default for now.
+ return Downloads.Impl.STATUS_PENDING;
+ }
+ } finally {
+ cursor.close();
+ }
+ }
}
diff --git a/src/com/android/providers/downloads/DownloadNotification.java b/src/com/android/providers/downloads/DownloadNotification.java
deleted file mode 100644
index bbd39f60..00000000
--- a/src/com/android/providers/downloads/DownloadNotification.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright (C) 2008 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.
- */
-
-package com.android.providers.downloads;
-
-import android.app.Notification;
-import android.app.PendingIntent;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.provider.Downloads;
-import android.text.TextUtils;
-import android.util.SparseLongArray;
-
-import java.util.Collection;
-import java.util.HashMap;
-
-/**
- * This class handles the updating of the Notification Manager for the
- * cases where there is an ongoing download. Once the download is complete
- * (be it successful or unsuccessful) it is no longer the responsibility
- * of this component to show the download in the notification manager.
- *
- */
-class DownloadNotification {
-
- Context mContext;
- HashMap <String, NotificationItem> mNotifications;
- private SystemFacade mSystemFacade;
-
- /** Time when each {@link DownloadInfo#mId} was first shown. */
- private SparseLongArray mFirstShown = new SparseLongArray();
-
- static final String LOGTAG = "DownloadNotification";
- static final String WHERE_RUNNING =
- "(" + Downloads.Impl.COLUMN_STATUS + " >= '100') AND (" +
- Downloads.Impl.COLUMN_STATUS + " <= '199') AND (" +
- Downloads.Impl.COLUMN_VISIBILITY + " IS NULL OR " +
- Downloads.Impl.COLUMN_VISIBILITY + " == '" + Downloads.Impl.VISIBILITY_VISIBLE + "' OR " +
- Downloads.Impl.COLUMN_VISIBILITY +
- " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "')";
- static final String WHERE_COMPLETED =
- Downloads.Impl.COLUMN_STATUS + " >= '200' AND " +
- Downloads.Impl.COLUMN_VISIBILITY +
- " == '" + Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED + "'";
-
-
- /**
- * This inner class is used to collate downloads that are owned by
- * the same application. This is so that only one notification line
- * item is used for all downloads of a given application.
- *
- */
- static class NotificationItem {
- // TODO: refactor to mNotifId and avoid building Uris based on it, since
- // they can overflow
- int mId; // This first db _id for the download for the app
- long mTotalCurrent = 0;
- long mTotalTotal = 0;
- int mTitleCount = 0;
- String mPackageName; // App package name
- String mDescription;
- String[] mTitles = new String[2]; // download titles.
- String mPausedText = null;
-
- /*
- * Add a second download to this notification item.
- */
- void addItem(String title, long currentBytes, long totalBytes) {
- mTotalCurrent += currentBytes;
- if (totalBytes <= 0 || mTotalTotal == -1) {
- mTotalTotal = -1;
- } else {
- mTotalTotal += totalBytes;
- }
- if (mTitleCount < 2) {
- mTitles[mTitleCount] = title;
- }
- mTitleCount++;
- }
- }
-
-
- /**
- * Constructor
- * @param ctx The context to use to obtain access to the
- * Notification Service
- */
- DownloadNotification(Context ctx, SystemFacade systemFacade) {
- mContext = ctx;
- mSystemFacade = systemFacade;
- mNotifications = new HashMap<String, NotificationItem>();
- }
-
- /*
- * Update the notification ui.
- */
- public void updateNotification(Collection<DownloadInfo> downloads) {
- updateActiveNotification(downloads);
- updateCompletedNotification(downloads);
- }
-
- private void updateActiveNotification(Collection<DownloadInfo> downloads) {
- // Collate the notifications
- mNotifications.clear();
- for (DownloadInfo download : downloads) {
- if (!isActiveAndVisible(download)) {
- continue;
- }
- String packageName = download.mPackage;
- long max = download.mTotalBytes;
- long progress = download.mCurrentBytes;
- long id = download.mId;
- String title = download.mTitle;
- if (title == null || title.length() == 0) {
- title = mContext.getResources().getString(
- R.string.download_unknown_title);
- }
-
- NotificationItem item;
- if (mNotifications.containsKey(packageName)) {
- item = mNotifications.get(packageName);
- item.addItem(title, progress, max);
- } else {
- item = new NotificationItem();
- item.mId = (int) id;
- item.mPackageName = packageName;
- item.mDescription = download.mDescription;
- item.addItem(title, progress, max);
- mNotifications.put(packageName, item);
- }
- if (download.mStatus == Downloads.Impl.STATUS_QUEUED_FOR_WIFI
- && item.mPausedText == null) {
- item.mPausedText = mContext.getResources().getString(
- R.string.notification_need_wifi_for_size);
- }
- }
-
- // Add the notifications
- for (NotificationItem item : mNotifications.values()) {
- // Build the notification object
- final Notification.Builder builder = new Notification.Builder(mContext);
-
- boolean hasPausedText = (item.mPausedText != null);
- int iconResource = android.R.drawable.stat_sys_download;
- if (hasPausedText) {
- iconResource = android.R.drawable.stat_sys_warning;
- }
- builder.setSmallIcon(iconResource);
- builder.setOngoing(true);
-
- // set notification "when" to be first time this DownloadInfo.mId
- // was encountered, which avoids fighting with other notifs.
- long firstShown = mFirstShown.get(item.mId, -1);
- if (firstShown == -1) {
- firstShown = System.currentTimeMillis();
- mFirstShown.put(item.mId, firstShown);
- }
- builder.setWhen(firstShown);
-
- boolean hasContentText = false;
- StringBuilder title = new StringBuilder(item.mTitles[0]);
- if (item.mTitleCount > 1) {
- title.append(mContext.getString(R.string.notification_filename_separator));
- title.append(item.mTitles[1]);
- if (item.mTitleCount > 2) {
- title.append(mContext.getString(R.string.notification_filename_extras,
- new Object[] { Integer.valueOf(item.mTitleCount - 2) }));
- }
- } else if (!TextUtils.isEmpty(item.mDescription)) {
- builder.setContentText(item.mDescription);
- hasContentText = true;
- }
- builder.setContentTitle(title);
-
- if (hasPausedText) {
- builder.setContentText(item.mPausedText);
- } else {
- builder.setProgress(
- (int) item.mTotalTotal, (int) item.mTotalCurrent, item.mTotalTotal == -1);
- if (hasContentText) {
- builder.setContentInfo(
- buildPercentageLabel(mContext, item.mTotalTotal, item.mTotalCurrent));
- }
- }
-
- Intent intent = new Intent(Constants.ACTION_LIST);
- intent.setClassName("com.android.providers.downloads",
- DownloadReceiver.class.getName());
- intent.setData(
- ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, item.mId));
- intent.putExtra("multiple", item.mTitleCount > 1);
-
- builder.setContentIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0));
-
- mSystemFacade.postNotification(item.mId, builder.getNotification());
-
- }
- }
-
- private void updateCompletedNotification(Collection<DownloadInfo> downloads) {
- for (DownloadInfo download : downloads) {
- if (!isCompleteAndVisible(download)) {
- continue;
- }
- notificationForCompletedDownload(download.mId, download.mTitle,
- download.mStatus, download.mDestination, download.mLastMod);
- }
- }
- void notificationForCompletedDownload(long id, String title, int status,
- int destination, long lastMod) {
- // Add the notifications
- Notification.Builder builder = new Notification.Builder(mContext);
- builder.setSmallIcon(android.R.drawable.stat_sys_download_done);
- if (title == null || title.length() == 0) {
- title = mContext.getResources().getString(
- R.string.download_unknown_title);
- }
- Uri contentUri =
- ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id);
- String caption;
- Intent intent;
- if (Downloads.Impl.isStatusError(status)) {
- caption = mContext.getResources()
- .getString(R.string.notification_download_failed);
- intent = new Intent(Constants.ACTION_LIST);
- } else {
- caption = mContext.getResources()
- .getString(R.string.notification_download_complete);
- if (destination != Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION) {
- intent = new Intent(Constants.ACTION_OPEN);
- } else {
- intent = new Intent(Constants.ACTION_LIST);
- }
- }
- intent.setClassName("com.android.providers.downloads",
- DownloadReceiver.class.getName());
- intent.setData(contentUri);
-
- builder.setWhen(lastMod);
- builder.setContentTitle(title);
- builder.setContentText(caption);
- builder.setContentIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0));
-
- intent = new Intent(Constants.ACTION_HIDE);
- intent.setClassName("com.android.providers.downloads",
- DownloadReceiver.class.getName());
- intent.setData(contentUri);
- builder.setDeleteIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0));
-
- mSystemFacade.postNotification(id, builder.getNotification());
- }
-
- private boolean isActiveAndVisible(DownloadInfo download) {
- return 100 <= download.mStatus && download.mStatus < 200
- && download.mVisibility != Downloads.Impl.VISIBILITY_HIDDEN;
- }
-
- private boolean isCompleteAndVisible(DownloadInfo download) {
- return download.mStatus >= 200
- && download.mVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED;
- }
-
- private static String buildPercentageLabel(
- Context context, long totalBytes, long currentBytes) {
- if (totalBytes <= 0) {
- return null;
- } else {
- final int percent = (int) (100 * currentBytes / totalBytes);
- return context.getString(R.string.download_percent, percent);
- }
- }
-}
diff --git a/src/com/android/providers/downloads/DownloadNotifier.java b/src/com/android/providers/downloads/DownloadNotifier.java
new file mode 100644
index 00000000..daae7831
--- /dev/null
+++ b/src/com/android/providers/downloads/DownloadNotifier.java
@@ -0,0 +1,318 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+package com.android.providers.downloads;
+
+import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE;
+import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED;
+import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION;
+
+import android.app.DownloadManager;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.net.Uri;
+import android.provider.Downloads;
+import android.text.TextUtils;
+import android.text.format.DateUtils;
+
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Multimap;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import javax.annotation.concurrent.GuardedBy;
+
+/**
+ * Update {@link NotificationManager} to reflect current {@link DownloadInfo}
+ * states. Collapses similar downloads into a single notification, and builds
+ * {@link PendingIntent} that launch towards {@link DownloadReceiver}.
+ */
+public class DownloadNotifier {
+
+ private static final int TYPE_ACTIVE = 1;
+ private static final int TYPE_WAITING = 2;
+ private static final int TYPE_COMPLETE = 3;
+
+ private final Context mContext;
+ private final NotificationManager mNotifManager;
+
+ /**
+ * Currently active notifications, mapped from clustering tag to timestamp
+ * when first shown.
+ *
+ * @see #buildNotificationTag(DownloadInfo)
+ */
+ @GuardedBy("mActiveNotifs")
+ private final HashMap<String, Long> mActiveNotifs = Maps.newHashMap();
+
+ public DownloadNotifier(Context context) {
+ mContext = context;
+ mNotifManager = (NotificationManager) context.getSystemService(
+ Context.NOTIFICATION_SERVICE);
+ }
+
+ public void cancelAll() {
+ mNotifManager.cancelAll();
+ }
+
+ /**
+ * Update {@link NotificationManager} to reflect the given set of
+ * {@link DownloadInfo}, adding, collapsing, and removing as needed.
+ */
+ public void updateWith(Collection<DownloadInfo> downloads) {
+ synchronized (mActiveNotifs) {
+ updateWithLocked(downloads);
+ }
+ }
+
+ private void updateWithLocked(Collection<DownloadInfo> downloads) {
+ final Resources res = mContext.getResources();
+
+ // Cluster downloads together
+ final Multimap<String, DownloadInfo> clustered = ArrayListMultimap.create();
+ for (DownloadInfo info : downloads) {
+ final String tag = buildNotificationTag(info);
+ if (tag != null) {
+ clustered.put(tag, info);
+ }
+ }
+
+ // Build notification for each cluster
+ for (String tag : clustered.keySet()) {
+ final int type = getNotificationTagType(tag);
+ final Collection<DownloadInfo> cluster = clustered.get(tag);
+
+ final Notification.Builder builder = new Notification.Builder(mContext);
+
+ // Use time when cluster was first shown to avoid shuffling
+ final long firstShown;
+ if (mActiveNotifs.containsKey(tag)) {
+ firstShown = mActiveNotifs.get(tag);
+ } else {
+ firstShown = System.currentTimeMillis();
+ mActiveNotifs.put(tag, firstShown);
+ }
+ builder.setWhen(firstShown);
+
+ // Show relevant icon
+ if (type == TYPE_ACTIVE) {
+ builder.setSmallIcon(android.R.drawable.stat_sys_download);
+ } else if (type == TYPE_WAITING) {
+ builder.setSmallIcon(android.R.drawable.stat_sys_warning);
+ } else if (type == TYPE_COMPLETE) {
+ builder.setSmallIcon(android.R.drawable.stat_sys_download_done);
+ }
+
+ // Build action intents
+ if (type == TYPE_ACTIVE || type == TYPE_WAITING) {
+ final Intent intent = new Intent(Constants.ACTION_LIST,
+ null, mContext, DownloadReceiver.class);
+ intent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS,
+ getDownloadIds(cluster));
+ builder.setContentIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0));
+ builder.setOngoing(true);
+
+ } else if (type == TYPE_COMPLETE) {
+ final DownloadInfo info = cluster.iterator().next();
+ final Uri uri = ContentUris.withAppendedId(
+ Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, info.mId);
+
+ final String action;
+ if (Downloads.Impl.isStatusError(info.mStatus)) {
+ action = Constants.ACTION_LIST;
+ } else {
+ if (info.mDestination != Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION) {
+ action = Constants.ACTION_OPEN;
+ } else {
+ action = Constants.ACTION_LIST;
+ }
+ }
+
+ final Intent intent = new Intent(action, uri, mContext, DownloadReceiver.class);
+ intent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS,
+ getDownloadIds(cluster));
+ builder.setContentIntent(PendingIntent.getBroadcast(mContext, 0, intent, 0));
+
+ final Intent hideIntent = new Intent(Constants.ACTION_HIDE,
+ uri, mContext, DownloadReceiver.class);
+ builder.setDeleteIntent(PendingIntent.getBroadcast(mContext, 0, hideIntent, 0));
+ }
+
+ // Calculate and show progress
+ String remainingText = null;
+ String percentText = null;
+ if (type == TYPE_ACTIVE) {
+ final DownloadHandler handler = DownloadHandler.getInstance();
+
+ long current = 0;
+ long total = 0;
+ long speed = 0;
+ for (DownloadInfo info : cluster) {
+ if (info.mTotalBytes != -1) {
+ current += info.mCurrentBytes;
+ total += info.mTotalBytes;
+ speed += handler.getCurrentSpeed(info.mId);
+ }
+ }
+
+ if (total > 0) {
+ final int percent = (int) ((current * 100) / total);
+ percentText = res.getString(R.string.download_percent, percent);
+
+ if (speed > 0) {
+ final long remainingMillis = ((total - current) * 1000) / speed;
+ remainingText = res.getString(R.string.download_remaining,
+ DateUtils.formatDuration(remainingMillis));
+ }
+
+ builder.setProgress(100, percent, false);
+ } else {
+ builder.setProgress(100, 0, true);
+ }
+ }
+
+ // Build titles and description
+ final Notification notif;
+ if (cluster.size() == 1) {
+ final DownloadInfo info = cluster.iterator().next();
+
+ builder.setContentTitle(getDownloadTitle(res, info));
+
+ if (type == TYPE_ACTIVE) {
+ if (!TextUtils.isEmpty(info.mDescription)) {
+ builder.setContentText(info.mDescription);
+ } else {
+ builder.setContentText(remainingText);
+ }
+ builder.setContentInfo(percentText);
+
+ } else if (type == TYPE_WAITING) {
+ builder.setContentText(
+ res.getString(R.string.notification_need_wifi_for_size));
+
+ } else if (type == TYPE_COMPLETE) {
+ if (Downloads.Impl.isStatusError(info.mStatus)) {
+ builder.setContentText(res.getText(R.string.notification_download_failed));
+ } else if (Downloads.Impl.isStatusSuccess(info.mStatus)) {
+ builder.setContentText(
+ res.getText(R.string.notification_download_complete));
+ }
+ }
+
+ notif = builder.build();
+
+ } else {
+ final Notification.InboxStyle inboxStyle = new Notification.InboxStyle(builder);
+
+ for (DownloadInfo info : cluster) {
+ inboxStyle.addLine(getDownloadTitle(res, info));
+ }
+
+ if (type == TYPE_ACTIVE) {
+ builder.setContentTitle(res.getQuantityString(
+ R.plurals.notif_summary_active, cluster.size(), cluster.size()));
+ builder.setContentText(remainingText);
+ builder.setContentInfo(percentText);
+ inboxStyle.setSummaryText(remainingText);
+
+ } else if (type == TYPE_WAITING) {
+ builder.setContentTitle(res.getQuantityString(
+ R.plurals.notif_summary_waiting, cluster.size(), cluster.size()));
+ builder.setContentText(
+ res.getString(R.string.notification_need_wifi_for_size));
+ inboxStyle.setSummaryText(
+ res.getString(R.string.notification_need_wifi_for_size));
+ }
+
+ notif = inboxStyle.build();
+ }
+
+ mNotifManager.notify(tag, 0, notif);
+ }
+
+ // Remove stale tags that weren't renewed
+ final Iterator<String> it = mActiveNotifs.keySet().iterator();
+ while (it.hasNext()) {
+ final String tag = it.next();
+ if (!clustered.containsKey(tag)) {
+ mNotifManager.cancel(tag, 0);
+ it.remove();
+ }
+ }
+ }
+
+ private static CharSequence getDownloadTitle(Resources res, DownloadInfo info) {
+ if (!TextUtils.isEmpty(info.mTitle)) {
+ return info.mTitle;
+ } else {
+ return res.getString(R.string.download_unknown_title);
+ }
+ }
+
+ private long[] getDownloadIds(Collection<DownloadInfo> infos) {
+ final long[] ids = new long[infos.size()];
+ int i = 0;
+ for (DownloadInfo info : infos) {
+ ids[i++] = info.mId;
+ }
+ return ids;
+ }
+
+ /**
+ * Build tag used for collapsing several {@link DownloadInfo} into a single
+ * {@link Notification}.
+ */
+ private static String buildNotificationTag(DownloadInfo info) {
+ if (info.mStatus == Downloads.Impl.STATUS_QUEUED_FOR_WIFI) {
+ return TYPE_WAITING + ":" + info.mPackage;
+ } else if (isActiveAndVisible(info)) {
+ return TYPE_ACTIVE + ":" + info.mPackage;
+ } else if (isCompleteAndVisible(info)) {
+ // Complete downloads always have unique notifs
+ return TYPE_COMPLETE + ":" + info.mId;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Return the cluster type of the given tag, as created by
+ * {@link #buildNotificationTag(DownloadInfo)}.
+ */
+ private static int getNotificationTagType(String tag) {
+ return Integer.parseInt(tag.substring(0, tag.indexOf(':')));
+ }
+
+ private static boolean isActiveAndVisible(DownloadInfo download) {
+ return Downloads.Impl.isStatusInformational(download.mStatus) &&
+ (download.mVisibility == VISIBILITY_VISIBLE
+ || download.mVisibility == VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
+ }
+
+ private static boolean isCompleteAndVisible(DownloadInfo download) {
+ return Downloads.Impl.isStatusCompleted(download.mStatus) &&
+ (download.mVisibility == VISIBILITY_VISIBLE_NOTIFY_COMPLETED
+ || download.mVisibility == VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION);
+ }
+}
diff --git a/src/com/android/providers/downloads/DownloadProvider.java b/src/com/android/providers/downloads/DownloadProvider.java
index 40ebd2bb..c554e41d 100644
--- a/src/com/android/providers/downloads/DownloadProvider.java
+++ b/src/com/android/providers/downloads/DownloadProvider.java
@@ -667,15 +667,10 @@ public final class DownloadProvider extends ContentProvider {
Context context = getContext();
if (values.getAsInteger(Downloads.Impl.COLUMN_DESTINATION) ==
Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD) {
- // don't start downloadservice because it has nothing to do in this case.
- // but does a completion notification need to be sent?
+ // When notification is requested, kick off service to process all
+ // relevant downloads.
if (Downloads.Impl.isNotificationToBeDisplayed(vis)) {
- DownloadNotification notifier = new DownloadNotification(context, mSystemFacade);
- notifier.notificationForCompletedDownload(rowID,
- values.getAsString(Downloads.Impl.COLUMN_TITLE),
- Downloads.Impl.STATUS_SUCCESS,
- Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD,
- lastMod);
+ context.startService(new Intent(context, DownloadService.class));
}
} else {
context.startService(new Intent(context, DownloadService.class));
diff --git a/src/com/android/providers/downloads/DownloadReceiver.java b/src/com/android/providers/downloads/DownloadReceiver.java
index 26ad992e..42f029a3 100644
--- a/src/com/android/providers/downloads/DownloadReceiver.java
+++ b/src/com/android/providers/downloads/DownloadReceiver.java
@@ -16,6 +16,9 @@
package com.android.providers.downloads;
+import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED;
+import static android.app.DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION;
+
import android.app.DownloadManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
@@ -27,22 +30,34 @@ import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
+import android.os.Handler;
+import android.os.HandlerThread;
import android.provider.Downloads;
+import android.text.TextUtils;
import android.util.Log;
+import android.widget.Toast;
import com.google.common.annotations.VisibleForTesting;
-import java.io.File;
-
/**
* Receives system broadcasts (boot, network connectivity)
*/
public class DownloadReceiver extends BroadcastReceiver {
+ private static final String TAG = "DownloadReceiver";
+
+ private static Handler sAsyncHandler;
+
+ static {
+ final HandlerThread thread = new HandlerThread(TAG);
+ thread.start();
+ sAsyncHandler = new Handler(thread.getLooper());
+ }
+
@VisibleForTesting
SystemFacade mSystemFacade = null;
@Override
- public void onReceive(Context context, Intent intent) {
+ public void onReceive(final Context context, final Intent intent) {
if (mSystemFacade == null) {
mSystemFacade = new RealSystemFacade(context);
}
@@ -72,7 +87,20 @@ public class DownloadReceiver extends BroadcastReceiver {
} else if (action.equals(Constants.ACTION_OPEN)
|| action.equals(Constants.ACTION_LIST)
|| action.equals(Constants.ACTION_HIDE)) {
- handleNotificationBroadcast(context, intent);
+
+ final PendingResult result = goAsync();
+ if (result == null) {
+ // TODO: remove this once test is refactored
+ handleNotificationBroadcast(context, intent);
+ } else {
+ sAsyncHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ handleNotificationBroadcast(context, intent);
+ result.finish();
+ }
+ });
+ }
}
}
@@ -80,56 +108,49 @@ public class DownloadReceiver extends BroadcastReceiver {
* Handle any broadcast related to a system notification.
*/
private void handleNotificationBroadcast(Context context, Intent intent) {
- Uri uri = intent.getData();
- String action = intent.getAction();
- if (Constants.LOGVV) {
- if (action.equals(Constants.ACTION_OPEN)) {
- Log.v(Constants.TAG, "Receiver open for " + uri);
- } else if (action.equals(Constants.ACTION_LIST)) {
- Log.v(Constants.TAG, "Receiver list for " + uri);
- } else { // ACTION_HIDE
- Log.v(Constants.TAG, "Receiver hide for " + uri);
- }
+ final String action = intent.getAction();
+ if (Constants.ACTION_LIST.equals(action)) {
+ final long[] ids = intent.getLongArrayExtra(
+ DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS);
+ sendNotificationClickedIntent(context, ids);
+
+ } else if (Constants.ACTION_OPEN.equals(action)) {
+ final long id = ContentUris.parseId(intent.getData());
+ openDownload(context, id);
+ hideNotification(context, id);
+
+ } else if (Constants.ACTION_HIDE.equals(action)) {
+ final long id = ContentUris.parseId(intent.getData());
+ hideNotification(context, id);
}
+ }
- Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);
- if (cursor == null) {
- return;
- }
+ /**
+ * Mark the given {@link DownloadManager#COLUMN_ID} as being acknowledged by
+ * user so it's not renewed later.
+ */
+ private void hideNotification(Context context, long id) {
+ final int status;
+ final int visibility;
+
+ final Uri uri = ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id);
+ final Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);
try {
- if (!cursor.moveToFirst()) {
+ if (cursor.moveToFirst()) {
+ status = getInt(cursor, Downloads.Impl.COLUMN_STATUS);
+ visibility = getInt(cursor, Downloads.Impl.COLUMN_VISIBILITY);
+ } else {
+ Log.w(TAG, "Missing details for download " + id);
return;
}
-
- if (action.equals(Constants.ACTION_OPEN)) {
- openDownload(context, cursor);
- hideNotification(context, uri, cursor);
- } else if (action.equals(Constants.ACTION_LIST)) {
- sendNotificationClickedIntent(intent, cursor);
- } else { // ACTION_HIDE
- hideNotification(context, uri, cursor);
- }
} finally {
cursor.close();
}
- }
- /**
- * Hide a system notification for a download.
- * @param uri URI to update the download
- * @param cursor Cursor for reading the download's fields
- */
- private void hideNotification(Context context, Uri uri, Cursor cursor) {
- mSystemFacade.cancelNotification(ContentUris.parseId(uri));
-
- int statusColumn = cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_STATUS);
- int status = cursor.getInt(statusColumn);
- int visibilityColumn =
- cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_VISIBILITY);
- int visibility = cursor.getInt(visibilityColumn);
- if (Downloads.Impl.isStatusCompleted(status)
- && visibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED) {
- ContentValues values = new ContentValues();
+ if (Downloads.Impl.isStatusCompleted(status) &&
+ (visibility == VISIBILITY_VISIBLE_NOTIFY_COMPLETED
+ || visibility == VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION)) {
+ final ContentValues values = new ContentValues();
values.put(Downloads.Impl.COLUMN_VISIBILITY,
Downloads.Impl.VISIBILITY_VISIBLE);
context.getContentResolver().update(uri, values, null, null);
@@ -137,79 +158,84 @@ public class DownloadReceiver extends BroadcastReceiver {
}
/**
- * Open the download that cursor is currently pointing to, since it's completed notification
- * has been clicked.
+ * Start activity to display the file represented by the given
+ * {@link DownloadManager#COLUMN_ID}.
*/
- private void openDownload(Context context, Cursor cursor) {
- String filename = cursor.getString(cursor.getColumnIndexOrThrow(Downloads.Impl._DATA));
- String mimetype =
- cursor.getString(cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_MIME_TYPE));
- Uri path = Uri.parse(filename);
- // If there is no scheme, then it must be a file
- if (path.getScheme() == null) {
- path = Uri.fromFile(new File(filename));
- }
-
- Intent activityIntent = new Intent(Intent.ACTION_VIEW);
- mimetype = DownloadDrmHelper.getOriginalMimeType(context, filename, mimetype);
- activityIntent.setDataAndType(path, mimetype);
- activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ private void openDownload(Context context, long id) {
+ final Intent intent = OpenHelper.buildViewIntent(context, id);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
- context.startActivity(activityIntent);
+ context.startActivity(intent);
} catch (ActivityNotFoundException ex) {
- Log.d(Constants.TAG, "no activity for " + mimetype, ex);
+ Log.d(Constants.TAG, "no activity for " + intent, ex);
+ Toast.makeText(context, R.string.download_no_application_title, Toast.LENGTH_LONG)
+ .show();
}
}
/**
* Notify the owner of a running download that its notification was clicked.
- * @param intent the broadcast intent sent by the notification manager
- * @param cursor Cursor for reading the download's fields
*/
- private void sendNotificationClickedIntent(Intent intent, Cursor cursor) {
- String pckg = cursor.getString(
- cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE));
- if (pckg == null) {
- return;
+ private void sendNotificationClickedIntent(Context context, long[] ids) {
+ final String packageName;
+ final String clazz;
+ final boolean isPublicApi;
+
+ final Uri uri = ContentUris.withAppendedId(
+ Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, ids[0]);
+ final Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);
+ try {
+ if (cursor.moveToFirst()) {
+ packageName = getString(cursor, Downloads.Impl.COLUMN_NOTIFICATION_PACKAGE);
+ clazz = getString(cursor, Downloads.Impl.COLUMN_NOTIFICATION_CLASS);
+ isPublicApi = getInt(cursor, Downloads.Impl.COLUMN_IS_PUBLIC_API) != 0;
+ } else {
+ Log.w(TAG, "Missing details for download " + ids[0]);
+ return;
+ }
+ } finally {
+ cursor.close();
}
- String clazz = cursor.getString(
- cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_NOTIFICATION_CLASS));
- boolean isPublicApi =
- cursor.getInt(cursor.getColumnIndex(Downloads.Impl.COLUMN_IS_PUBLIC_API)) != 0;
+ if (TextUtils.isEmpty(packageName)) {
+ Log.w(TAG, "Missing package; skipping broadcast");
+ return;
+ }
Intent appIntent = null;
if (isPublicApi) {
appIntent = new Intent(DownloadManager.ACTION_NOTIFICATION_CLICKED);
- appIntent.setPackage(pckg);
- // send id of the items clicked on.
- if (intent.getBooleanExtra("multiple", false)) {
- // broadcast received saying click occurred on a notification with multiple titles.
- // don't include any ids at all - let the caller query all downloads belonging to it
- // TODO modify the broadcast to include ids of those multiple notifications.
- } else {
- appIntent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS,
- new long[] {
- cursor.getLong(cursor.getColumnIndexOrThrow(Downloads.Impl._ID))});
- }
+ appIntent.setPackage(packageName);
+ appIntent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS, ids);
+
} else { // legacy behavior
- if (clazz == null) {
+ if (TextUtils.isEmpty(clazz)) {
+ Log.w(TAG, "Missing class; skipping broadcast");
return;
}
+
appIntent = new Intent(DownloadManager.ACTION_NOTIFICATION_CLICKED);
- appIntent.setClassName(pckg, clazz);
- if (intent.getBooleanExtra("multiple", true)) {
- appIntent.setData(Downloads.Impl.CONTENT_URI);
+ appIntent.setClassName(packageName, clazz);
+ appIntent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS, ids);
+
+ if (ids.length == 1) {
+ appIntent.setData(uri);
} else {
- long downloadId = cursor.getLong(cursor.getColumnIndexOrThrow(Downloads.Impl._ID));
- appIntent.setData(
- ContentUris.withAppendedId(Downloads.Impl.CONTENT_URI, downloadId));
+ appIntent.setData(Downloads.Impl.CONTENT_URI);
}
}
mSystemFacade.sendBroadcast(appIntent);
}
+ private static String getString(Cursor cursor, String col) {
+ return cursor.getString(cursor.getColumnIndexOrThrow(col));
+ }
+
+ private static int getInt(Cursor cursor, String col) {
+ return cursor.getInt(cursor.getColumnIndexOrThrow(col));
+ }
+
private void startService(Context context) {
context.startService(new Intent(context, DownloadService.class));
}
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java
index 3b566f8e..b97346b2 100644
--- a/src/com/android/providers/downloads/DownloadService.java
+++ b/src/com/android/providers/downloads/DownloadService.java
@@ -38,8 +38,8 @@ import android.os.RemoteException;
import android.provider.Downloads;
import android.text.TextUtils;
import android.util.Log;
-import android.util.Slog;
+import com.android.internal.annotations.GuardedBy;
import com.android.internal.util.IndentingPrintWriter;
import com.google.android.collect.Maps;
import com.google.common.annotations.VisibleForTesting;
@@ -65,7 +65,7 @@ public class DownloadService extends Service {
private DownloadManagerContentObserver mObserver;
/** Class to handle Notification Manager updates */
- private DownloadNotification mNotifier;
+ private DownloadNotifier mNotifier;
/**
* The Service's view of the list of downloads, mapping download IDs to the corresponding info
@@ -73,6 +73,7 @@ public class DownloadService extends Service {
* downloads based on this data, so that it can deal with situation where the data in the
* content provider changes or disappears.
*/
+ @GuardedBy("mDownloads")
private Map<Long, DownloadInfo> mDownloads = Maps.newHashMap();
/**
@@ -221,8 +222,9 @@ public class DownloadService extends Service {
mMediaScannerConnecting = false;
mMediaScannerConnection = new MediaScannerConnection();
- mNotifier = new DownloadNotification(this, mSystemFacade);
- mSystemFacade.cancelAllNotifications();
+ mNotifier = new DownloadNotifier(this);
+ mNotifier.cancelAll();
+
mStorageManager = StorageManager.getInstance(getApplicationContext());
updateFromProvider();
}
@@ -356,7 +358,7 @@ public class DownloadService extends Service {
}
}
}
- mNotifier.updateNotification(mDownloads.values());
+ mNotifier.updateWith(mDownloads.values());
if (mustScan) {
bindMediaScanner();
} else {
@@ -456,18 +458,6 @@ public class DownloadService extends Service {
Log.v(Constants.TAG, "processing updated download " + info.mId +
", status: " + info.mStatus);
}
-
- boolean lostVisibility =
- oldVisibility == Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED
- && info.mVisibility != Downloads.Impl.VISIBILITY_VISIBLE_NOTIFY_COMPLETED
- && Downloads.Impl.isStatusCompleted(info.mStatus);
- boolean justCompleted =
- !Downloads.Impl.isStatusCompleted(oldStatus)
- && Downloads.Impl.isStatusCompleted(info.mStatus);
- if (lostVisibility || justCompleted) {
- mSystemFacade.cancelNotification(info.mId);
- }
-
info.startIfReady(now, mStorageManager);
}
@@ -476,17 +466,15 @@ public class DownloadService extends Service {
*/
private void deleteDownloadLocked(long id) {
DownloadInfo info = mDownloads.get(id);
- if (info.shouldScanFile()) {
- scanFile(info, false, false);
- }
if (info.mStatus == Downloads.Impl.STATUS_RUNNING) {
info.mStatus = Downloads.Impl.STATUS_CANCELED;
}
if (info.mDestination != Downloads.Impl.DESTINATION_EXTERNAL && info.mFileName != null) {
- Slog.d(TAG, "deleteDownloadLocked() deleting " + info.mFileName);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "deleteDownloadLocked() deleting " + info.mFileName);
+ }
new File(info.mFileName).delete();
}
- mSystemFacade.cancelNotification(info.mId);
mDownloads.remove(info.mId);
}
@@ -559,7 +547,9 @@ public class DownloadService extends Service {
private void deleteFileIfExists(String path) {
try {
if (!TextUtils.isEmpty(path)) {
- Slog.d(TAG, "deleteFileIfExists() deleting " + path);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "deleteFileIfExists() deleting " + path);
+ }
File file = new File(path);
file.delete();
}
diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java
index bd91eaa1..34bc8e34 100644
--- a/src/com/android/providers/downloads/DownloadThread.java
+++ b/src/com/android/providers/downloads/DownloadThread.java
@@ -29,11 +29,11 @@ import android.net.http.AndroidHttpClient;
import android.os.FileUtils;
import android.os.PowerManager;
import android.os.Process;
+import android.os.SystemClock;
import android.provider.Downloads;
import android.text.TextUtils;
import android.util.Log;
import android.util.Pair;
-import android.util.Slog;
import org.apache.http.Header;
import org.apache.http.HttpResponse;
@@ -101,6 +101,13 @@ public class DownloadThread extends Thread {
public long mBytesNotified = 0;
public long mTimeLastNotification = 0;
+ /** Historical bytes/second speed of this download. */
+ public long mSpeed;
+ /** Time when current sample started. */
+ public long mSpeedSampleStart;
+ /** Bytes transferred since current sample started. */
+ public long mSpeedSampleBytes;
+
public State(DownloadInfo info) {
mMimeType = Intent.normalizeMimeType(info.mMimeType);
mRequestUri = info.mUri;
@@ -131,6 +138,21 @@ public class DownloadThread extends Thread {
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
+ try {
+ runInternal();
+ } finally {
+ DownloadHandler.getInstance().dequeueDownload(mInfo.mId);
+ }
+ }
+
+ private void runInternal() {
+ // Skip when download already marked as finished; this download was
+ // probably started again while racing with UpdateThread.
+ if (DownloadInfo.queryDownloadStatus(mContext.getContentResolver(), mInfo.mId)
+ == Downloads.Impl.STATUS_SUCCESS) {
+ Log.d(TAG, "Download " + mInfo.mId + " already finished; skipping");
+ return;
+ }
State state = new State(mInfo);
AndroidHttpClient client = null;
@@ -211,7 +233,6 @@ public class DownloadThread extends Thread {
notifyDownloadCompleted(finalStatus, state.mCountRetry, state.mRetryAfter,
state.mGotData, state.mFilename,
state.mNewUri, state.mMimeType, errorMsg);
- DownloadHandler.getInstance().dequeueDownload(mInfo.mId);
netPolicy.unregisterListener(mPolicyListener);
@@ -330,7 +351,9 @@ public class DownloadThread extends Thread {
closeDestination(state);
if (state.mFilename != null && Downloads.Impl.isStatusError(finalStatus)) {
- Slog.d(TAG, "cleanupDestination() deleting " + state.mFilename);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "cleanupDestination() deleting " + state.mFilename);
+ }
new File(state.mFilename).delete();
state.mFilename = null;
}
@@ -408,7 +431,25 @@ public class DownloadThread extends Thread {
* Report download progress through the database if necessary.
*/
private void reportProgress(State state, InnerState innerState) {
- long now = mSystemFacade.currentTimeMillis();
+ final long now = SystemClock.elapsedRealtime();
+
+ final long sampleDelta = now - state.mSpeedSampleStart;
+ if (sampleDelta > 500) {
+ final long sampleSpeed = ((state.mCurrentBytes - state.mSpeedSampleBytes) * 1000)
+ / sampleDelta;
+
+ if (state.mSpeed == 0) {
+ state.mSpeed = sampleSpeed;
+ } else {
+ state.mSpeed = ((state.mSpeed * 3) + sampleSpeed) / 4;
+ }
+
+ state.mSpeedSampleStart = now;
+ state.mSpeedSampleBytes = state.mCurrentBytes;
+
+ DownloadHandler.getInstance().setCurrentSpeed(mInfo.mId, state.mSpeed);
+ }
+
if (state.mCurrentBytes - state.mBytesNotified > Constants.MIN_PROGRESS_STEP &&
now - state.mTimeLastNotification > Constants.MIN_PROGRESS_TIME) {
ContentValues values = new ContentValues();
@@ -847,8 +888,10 @@ public class DownloadThread extends Thread {
long fileLength = f.length();
if (fileLength == 0) {
// The download hadn't actually started, we can restart from scratch
- Slog.d(TAG, "setupDestinationFile() found fileLength=0, deleting "
- + state.mFilename);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "setupDestinationFile() found fileLength=0, deleting "
+ + state.mFilename);
+ }
f.delete();
state.mFilename = null;
if (Constants.LOGV) {
@@ -857,8 +900,10 @@ public class DownloadThread extends Thread {
}
} else if (mInfo.mETag == null && !mInfo.mNoIntegrity) {
// This should've been caught upon failure
- Slog.d(TAG, "setupDestinationFile() unable to resume download, deleting "
- + state.mFilename);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "setupDestinationFile() unable to resume download, deleting "
+ + state.mFilename);
+ }
f.delete();
throw new StopRequestException(Downloads.Impl.STATUS_CANNOT_RESUME,
"Trying to resume a download that can't be resumed");
diff --git a/src/com/android/providers/downloads/OpenHelper.java b/src/com/android/providers/downloads/OpenHelper.java
new file mode 100644
index 00000000..7eca95c9
--- /dev/null
+++ b/src/com/android/providers/downloads/OpenHelper.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2012 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.
+ */
+
+package com.android.providers.downloads;
+
+import static android.app.DownloadManager.COLUMN_LOCAL_FILENAME;
+import static android.app.DownloadManager.COLUMN_LOCAL_URI;
+import static android.app.DownloadManager.COLUMN_MEDIA_TYPE;
+import static android.app.DownloadManager.COLUMN_URI;
+import static android.provider.Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI;
+
+import android.app.DownloadManager;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.Intent;
+import android.database.Cursor;
+import android.net.Uri;
+import android.provider.Downloads.Impl.RequestHeaders;
+
+public class OpenHelper {
+ /**
+ * Build an {@link Intent} to view the download at current {@link Cursor}
+ * position, handling subtleties around installing packages.
+ */
+ public static Intent buildViewIntent(Context context, long id) {
+ final DownloadManager downManager = (DownloadManager) context.getSystemService(
+ Context.DOWNLOAD_SERVICE);
+ downManager.setAccessAllDownloads(true);
+
+ final Cursor cursor = downManager.query(new DownloadManager.Query().setFilterById(id));
+ try {
+ if (!cursor.moveToFirst()) {
+ throw new IllegalArgumentException("Missing download " + id);
+ }
+
+ final Uri localUri = getCursorUri(cursor, COLUMN_LOCAL_URI);
+ final String filename = getCursorString(cursor, COLUMN_LOCAL_FILENAME);
+ String mimeType = getCursorString(cursor, COLUMN_MEDIA_TYPE);
+ mimeType = DownloadDrmHelper.getOriginalMimeType(context, filename, mimeType);
+
+ final Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+
+ if ("application/vnd.android.package-archive".equals(mimeType)) {
+ // PackageInstaller doesn't like content URIs, so open file
+ intent.setDataAndType(localUri, mimeType);
+
+ // Also splice in details about where it came from
+ final Uri remoteUri = getCursorUri(cursor, COLUMN_URI);
+ intent.putExtra(Intent.EXTRA_ORIGINATING_URI, remoteUri);
+ intent.putExtra(Intent.EXTRA_REFERRER, getRefererUri(context, id));
+ intent.putExtra(Intent.EXTRA_ORIGINATING_UID, getOriginatingUid(context, id));
+ } else if ("file".equals(localUri.getScheme())) {
+ intent.setDataAndType(
+ ContentUris.withAppendedId(ALL_DOWNLOADS_CONTENT_URI, id), mimeType);
+ } else {
+ intent.setDataAndType(localUri, mimeType);
+ }
+
+ return intent;
+ } finally {
+ cursor.close();
+ }
+ }
+
+ private static Uri getRefererUri(Context context, long id) {
+ final Uri headersUri = Uri.withAppendedPath(
+ ContentUris.withAppendedId(ALL_DOWNLOADS_CONTENT_URI, id),
+ RequestHeaders.URI_SEGMENT);
+ final Cursor headers = context.getContentResolver()
+ .query(headersUri, null, null, null, null);
+ try {
+ while (headers.moveToNext()) {
+ final String header = getCursorString(headers, RequestHeaders.COLUMN_HEADER);
+ if ("Referer".equalsIgnoreCase(header)) {
+ return getCursorUri(headers, RequestHeaders.COLUMN_VALUE);
+ }
+ }
+ } finally {
+ headers.close();
+ }
+ return null;
+ }
+
+ private static int getOriginatingUid(Context context, long id) {
+ final Uri uri = ContentUris.withAppendedId(ALL_DOWNLOADS_CONTENT_URI, id);
+ final Cursor cursor = context.getContentResolver().query(uri, new String[]{Constants.UID},
+ null, null, null);
+ if (cursor != null) {
+ try {
+ if (cursor.moveToFirst()) {
+ return cursor.getInt(cursor.getColumnIndexOrThrow(Constants.UID));
+ }
+ } finally {
+ cursor.close();
+ }
+ }
+ return -1;
+ }
+
+ private static String getCursorString(Cursor cursor, String column) {
+ return cursor.getString(cursor.getColumnIndexOrThrow(column));
+ }
+
+ private static Uri getCursorUri(Cursor cursor, String column) {
+ return Uri.parse(getCursorString(cursor, column));
+ }
+
+ private static long getCursorLong(Cursor cursor, String column) {
+ return cursor.getLong(cursor.getColumnIndexOrThrow(column));
+ }
+}
diff --git a/src/com/android/providers/downloads/RealSystemFacade.java b/src/com/android/providers/downloads/RealSystemFacade.java
index 6580f909..228c7165 100644
--- a/src/com/android/providers/downloads/RealSystemFacade.java
+++ b/src/com/android/providers/downloads/RealSystemFacade.java
@@ -1,26 +1,35 @@
+/*
+ * Copyright (C) 2008 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.
+ */
+
package com.android.providers.downloads;
import android.app.DownloadManager;
-import android.app.Notification;
-import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
-import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
import android.telephony.TelephonyManager;
import android.util.Log;
class RealSystemFacade implements SystemFacade {
private Context mContext;
- private NotificationManager mNotificationManager;
public RealSystemFacade(Context context) {
mContext = context;
- mNotificationManager = (NotificationManager)
- mContext.getSystemService(Context.NOTIFICATION_SERVICE);
}
public long currentTimeMillis() {
@@ -85,26 +94,6 @@ class RealSystemFacade implements SystemFacade {
}
@Override
- public void postNotification(long id, Notification notification) {
- /**
- * TODO: The system notification manager takes ints, not longs, as IDs, but the download
- * manager uses IDs take straight from the database, which are longs. This will have to be
- * dealt with at some point.
- */
- mNotificationManager.notify((int) id, notification);
- }
-
- @Override
- public void cancelNotification(long id) {
- mNotificationManager.cancel((int) id);
- }
-
- @Override
- public void cancelAllNotifications() {
- mNotificationManager.cancelAll();
- }
-
- @Override
public void startThread(Thread thread) {
thread.start();
}
diff --git a/src/com/android/providers/downloads/StorageManager.java b/src/com/android/providers/downloads/StorageManager.java
index 4b51921f..915d141b 100644
--- a/src/com/android/providers/downloads/StorageManager.java
+++ b/src/com/android/providers/downloads/StorageManager.java
@@ -30,7 +30,6 @@ import android.os.StatFs;
import android.provider.Downloads;
import android.text.TextUtils;
import android.util.Log;
-import android.util.Slog;
import com.android.internal.R;
@@ -342,9 +341,9 @@ class StorageManager {
if (TextUtils.isEmpty(data)) continue;
File file = new File(data);
- if (true || Constants.LOGV) {
- Slog.d(Constants.TAG, "purging " + file.getAbsolutePath() + " for " +
- file.length() + " bytes");
+ if (Constants.LOGV) {
+ Log.d(Constants.TAG, "purging " + file.getAbsolutePath() + " for "
+ + file.length() + " bytes");
}
totalFreed += file.length();
file.delete();
@@ -416,7 +415,9 @@ class StorageManager {
try {
final StructStat stat = Libcore.os.stat(path);
if (stat.st_uid == myUid) {
- Slog.d(TAG, "deleting spurious file " + path);
+ if (Constants.LOGVV) {
+ Log.d(TAG, "deleting spurious file " + path);
+ }
file.delete();
}
} catch (ErrnoException e) {
diff --git a/src/com/android/providers/downloads/SystemFacade.java b/src/com/android/providers/downloads/SystemFacade.java
index d1439354..fda97e08 100644
--- a/src/com/android/providers/downloads/SystemFacade.java
+++ b/src/com/android/providers/downloads/SystemFacade.java
@@ -1,12 +1,25 @@
+/*
+ * Copyright (C) 2008 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.
+ */
package com.android.providers.downloads;
-import android.app.Notification;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.NetworkInfo;
-
interface SystemFacade {
/**
* @see System#currentTimeMillis()
@@ -50,21 +63,6 @@ interface SystemFacade {
public boolean userOwnsPackage(int uid, String pckg) throws NameNotFoundException;
/**
- * Post a system notification to the NotificationManager.
- */
- public void postNotification(long id, Notification notification);
-
- /**
- * Cancel a system notification.
- */
- public void cancelNotification(long id);
-
- /**
- * Cancel all system notifications.
- */
- public void cancelAllNotifications();
-
- /**
* Start a thread.
*/
public void startThread(Thread thread);
diff --git a/tests/Android.mk b/tests/Android.mk
index aaf32ba4..ff3e1d47 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -8,7 +8,7 @@ LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_INSTRUMENTATION_FOR := DownloadProvider
LOCAL_JAVA_LIBRARIES := android.test.runner
-LOCAL_STATIC_JAVA_LIBRARIES := mockwebserver
+LOCAL_STATIC_JAVA_LIBRARIES := mockwebserver littlemock dexmaker
LOCAL_PACKAGE_NAME := DownloadProviderTests
LOCAL_CERTIFICATE := media
diff --git a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
index 1912e84c..a65693fa 100644
--- a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java
@@ -16,6 +16,9 @@
package com.android.providers.downloads;
+import static com.google.testing.littlemock.LittleMock.mock;
+
+import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
@@ -42,9 +45,6 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
public abstract class AbstractDownloadProviderFunctionalTest extends
ServiceTestCase<DownloadService> {
@@ -94,19 +94,14 @@ public abstract class AbstractDownloadProviderFunctionalTest extends
static class TestContext extends RenamingDelegatingContext {
private static final String FILENAME_PREFIX = "test.";
- private Context mRealContext;
- private Set<String> mAllowedSystemServices;
private ContentResolver mResolver;
+ private final NotificationManager mNotifManager;
boolean mHasServiceBeenStarted = false;
public TestContext(Context realContext) {
super(realContext, FILENAME_PREFIX);
- mRealContext = realContext;
- mAllowedSystemServices = new HashSet<String>(Arrays.asList(new String[] {
- Context.NOTIFICATION_SERVICE,
- Context.POWER_SERVICE,
- }));
+ mNotifManager = mock(NotificationManager.class);
}
public void setResolver(ContentResolver resolver) {
@@ -118,7 +113,6 @@ public abstract class AbstractDownloadProviderFunctionalTest extends
*/
@Override
public ContentResolver getContentResolver() {
- assert mResolver != null;
return mResolver;
}
@@ -127,9 +121,10 @@ public abstract class AbstractDownloadProviderFunctionalTest extends
*/
@Override
public Object getSystemService(String name) {
- if (mAllowedSystemServices.contains(name)) {
- return mRealContext.getSystemService(name);
+ if (Context.NOTIFICATION_SERVICE.equals(name)) {
+ return mNotifManager;
}
+
return super.getSystemService(name);
}
@@ -155,10 +150,13 @@ public abstract class AbstractDownloadProviderFunctionalTest extends
protected void setUp() throws Exception {
super.setUp();
- Context realContext = getContext();
+ // Since we're testing a system app, AppDataDirGuesser doesn't find our
+ // cache dir, so set it explicitly.
+ System.setProperty("dexmaker.dexcache", getContext().getCacheDir().toString());
+
+ final Context realContext = getContext();
mTestContext = new TestContext(realContext);
setupProviderAndResolver();
-
mTestContext.setResolver(mResolver);
setContext(mTestContext);
setupService();
diff --git a/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java b/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java
index bbc5c3e0..23d300f8 100644
--- a/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/DownloadProviderFunctionalTest.java
@@ -116,7 +116,7 @@ public class DownloadProviderFunctionalTest extends AbstractDownloadProviderFunc
int rslt = getDownloadStatus(downloadUri);
if (rslt == Downloads.Impl.STATUS_RUNNING || rslt == Downloads.Impl.STATUS_PENDING) {
Log.i(TAG, "status is: " + rslt + ", for: " + downloadUri);
- DownloadHandler.getInstance().WaitUntilDownloadsTerminate();
+ DownloadHandler.getInstance().waitUntilDownloadsTerminate();
Thread.sleep(100);
} else {
done = true;
diff --git a/tests/src/com/android/providers/downloads/FakeSystemFacade.java b/tests/src/com/android/providers/downloads/FakeSystemFacade.java
index c184de83..481b5cba 100644
--- a/tests/src/com/android/providers/downloads/FakeSystemFacade.java
+++ b/tests/src/com/android/providers/downloads/FakeSystemFacade.java
@@ -1,17 +1,14 @@
package com.android.providers.downloads;
-import android.app.Notification;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
-import android.test.AssertionFailedError;
+import android.net.NetworkInfo.DetailedState;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
import java.util.Queue;
public class FakeSystemFacade implements SystemFacade {
@@ -22,8 +19,6 @@ public class FakeSystemFacade implements SystemFacade {
Long mMaxBytesOverMobile = null;
Long mRecommendedMaxBytesOverMobile = null;
List<Intent> mBroadcastsSent = new ArrayList<Intent>();
- Map<Long,Notification> mActiveNotifications = new HashMap<Long,Notification>();
- List<Notification> mCanceledNotifications = new ArrayList<Notification>();
Queue<Thread> mStartedThreads = new LinkedList<Thread>();
private boolean returnActualTime = false;
@@ -42,7 +37,9 @@ public class FakeSystemFacade implements SystemFacade {
if (mActiveNetworkType == null) {
return null;
} else {
- return new NetworkInfo(mActiveNetworkType, 0, null, null);
+ final NetworkInfo info = new NetworkInfo(mActiveNetworkType, 0, null, null);
+ info.setDetailedState(DetailedState.CONNECTED, null, null);
+ return info;
}
}
@@ -73,29 +70,6 @@ public class FakeSystemFacade implements SystemFacade {
return true;
}
- @Override
- public void postNotification(long id, Notification notification) {
- if (notification == null) {
- throw new AssertionFailedError("Posting null notification");
- }
- mActiveNotifications.put(id, notification);
- }
-
- @Override
- public void cancelNotification(long id) {
- Notification notification = mActiveNotifications.remove(id);
- if (notification != null) {
- mCanceledNotifications.add(notification);
- }
- }
-
- @Override
- public void cancelAllNotifications() {
- for (long id : mActiveNotifications.keySet()) {
- cancelNotification(id);
- }
- }
-
public boolean startThreadsWithoutWaiting = false;
public void setStartThreadsWithoutWaiting(boolean flag) {
this.startThreadsWithoutWaiting = flag;
diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
index 2f5282ae..2661a1f2 100644
--- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
+++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
@@ -16,7 +16,18 @@
package com.android.providers.downloads;
+import static com.google.testing.littlemock.LittleMock.anyInt;
+import static com.google.testing.littlemock.LittleMock.anyString;
+import static com.google.testing.littlemock.LittleMock.atLeastOnce;
+import static com.google.testing.littlemock.LittleMock.isA;
+import static com.google.testing.littlemock.LittleMock.never;
+import static com.google.testing.littlemock.LittleMock.times;
+import static com.google.testing.littlemock.LittleMock.verify;
+
import android.app.DownloadManager;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.net.ConnectivityManager;
@@ -24,7 +35,6 @@ import android.net.Uri;
import android.os.Environment;
import android.provider.Downloads;
import android.test.suitebuilder.annotation.LargeTest;
-import android.util.Log;
import com.google.mockwebserver.MockResponse;
import com.google.mockwebserver.RecordedRequest;
@@ -37,12 +47,14 @@ import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.List;
+
@LargeTest
public class PublicApiFunctionalTest extends AbstractPublicApiTest {
private static final String REDIRECTED_PATH = "/other_path";
private static final String ETAG = "my_etag";
protected File mTestDirectory;
+ private NotificationManager mNotifManager;
public PublicApiFunctionalTest() {
super(new FakeSystemFacade());
@@ -52,6 +64,9 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
protected void setUp() throws Exception {
super.setUp();
+ mNotifManager = (NotificationManager) getContext()
+ .getSystemService(Context.NOTIFICATION_SERVICE);
+
mTestDirectory = new File(Environment.getExternalStorageDirectory() + File.separator
+ "download_manager_functional_test");
if (mTestDirectory.exists()) {
@@ -435,6 +450,8 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
receiver.mSystemFacade = mSystemFacade;
Intent intent = new Intent(Constants.ACTION_LIST);
intent.setData(Uri.parse(Downloads.Impl.CONTENT_URI + "/" + download.mId));
+ intent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS,
+ new long[] { download.mId });
receiver.onReceive(mContext, intent);
assertEquals(1, mSystemFacade.mBroadcastsSent.size());
@@ -501,24 +518,42 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
assertTrue(mResolver.mNotifyWasCalled);
}
- public void testNotifications() throws Exception {
- enqueueResponse(buildEmptyResponse(HTTP_OK));
+ public void testNotificationNever() throws Exception {
enqueueResponse(buildEmptyResponse(HTTP_OK));
- Download download = enqueueRequest(getRequest().setShowRunningNotification(false));
+ final Download download = enqueueRequest(
+ getRequest().setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN));
download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL);
- assertEquals(0, mSystemFacade.mActiveNotifications.size());
- assertEquals(0, mSystemFacade.mCanceledNotifications.size());
+ runService();
+
+ verify(mNotifManager, never()).notify(anyString(), anyInt(), isA(Notification.class));
+ // TODO: verify that it never cancels
+ }
+
+ public void testNotificationVisible() throws Exception {
+ enqueueResponse(buildEmptyResponse(HTTP_OK));
- download = enqueueRequest(getRequest()); // notifications by default
+ // only shows in-progress notifications
+ final Download download = enqueueRequest(getRequest());
download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL);
- assertEquals(1, mSystemFacade.mActiveNotifications.size());
+ runService();
+
+ // TODO: verify different notif types with tags
+ verify(mNotifManager, atLeastOnce()).notify(anyString(), anyInt(), isA(Notification.class));
+ verify(mNotifManager, times(1)).cancel(anyString(), anyInt());
+ }
- // The notification doesn't actually get canceled until the UpdateThread runs again, which
- // gets triggered by the DownloadThread updating the status in the provider.
+ public void testNotificationVisibleComplete() throws Exception {
+ enqueueResponse(buildEmptyResponse(HTTP_OK));
+
+ final Download download = enqueueRequest(getRequest().setNotificationVisibility(
+ DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED));
+ download.runUntilStatus(DownloadManager.STATUS_SUCCESSFUL);
runService();
- assertEquals(0, mSystemFacade.mActiveNotifications.size());
- assertEquals(1, mSystemFacade.mCanceledNotifications.size());
+
+ // TODO: verify different notif types with tags
+ verify(mNotifManager, atLeastOnce()).notify(anyString(), anyInt(), isA(Notification.class));
+ verify(mNotifManager, times(1)).cancel(anyString(), anyInt());
}
public void testRetryAfter() throws Exception {
diff --git a/ui/Android.mk b/ui/Android.mk
index 8c925f64..14211ea2 100644
--- a/ui/Android.mk
+++ b/ui/Android.mk
@@ -3,7 +3,10 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_SRC_FILES := $(call all-java-files-under, src) \
+ ../src/com/android/providers/downloads/OpenHelper.java \
+ ../src/com/android/providers/downloads/Constants.java \
+ ../src/com/android/providers/downloads/DownloadDrmHelper.java
LOCAL_PACKAGE_NAME := DownloadProviderUi
LOCAL_CERTIFICATE := media
diff --git a/ui/res/mipmap-xxhdpi/ic_launcher_download.png b/ui/res/mipmap-xxhdpi/ic_launcher_download.png
new file mode 100644
index 00000000..0921c124
--- /dev/null
+++ b/ui/res/mipmap-xxhdpi/ic_launcher_download.png
Binary files differ
diff --git a/ui/res/values-fa/strings.xml b/ui/res/values-fa/strings.xml
index 5668de9f..fd81dd26 100644
--- a/ui/res/values-fa/strings.xml
+++ b/ui/res/values-fa/strings.xml
@@ -28,12 +28,12 @@
<string name="download_success" msgid="7006048006543495236">"کامل"</string>
<string name="download_error" msgid="8081329546008568251">"ناموفق"</string>
<string name="dialog_title_not_available" msgid="5746317632356158515">"دانلود ممکن نیست."</string>
- <string name="dialog_failed_body" msgid="587545111677064427">"می خواهید بعداً دوباره برای دانلود فایل تلاش کنید یا آن را از صف خارج کنید؟"</string>
+ <string name="dialog_failed_body" msgid="587545111677064427">"می‌خواهید بعداً دوباره برای دانلود فایل تلاش کنید یا آن را از صف خارج کنید؟"</string>
<string name="dialog_title_queued_body" msgid="6760681913815015219">"فایل‌ در نوبت"</string>
<string name="dialog_queued_body" msgid="708552801635572720">"این فایل برای دانلود در آینده در نوبت قرار گرفته است، بنابراین هنوز در دسترس نیست."</string>
<string name="dialog_file_missing_body" msgid="3223012612774276284">"نمی‌توانم فایل‌های دانلود شده را پیدا کنم."</string>
<string name="dialog_insufficient_space_on_external" msgid="8692452156251449195">"نمی‌توان دانلود را به پایان رساند. فضای کافی در حافظه خارجی وجود ندارد."</string>
- <string name="dialog_insufficient_space_on_cache" msgid="6313630206163908994">"نمی‌توان دانلود را به پایان رساند. فضای کافی در حافظه داخلی دانلود وجود ندارد."</string>
+ <string name="dialog_insufficient_space_on_cache" msgid="6313630206163908994">"نمی‌توان دانلود را به پایان رساند. فضای کافی در حافظهٔ داخلی دانلود وجود ندارد."</string>
<string name="dialog_cannot_resume" msgid="8664509751358983543">"دانلود قطع شد و نمی‌توان آن را از سرگیری کرد."</string>
<string name="dialog_file_already_exists" msgid="8308563940663449590">"دانلود نمی‌شود. فایل مقصد از قبل موجود است."</string>
<string name="dialog_media_not_found" msgid="4468088418758018765">"دانلود نمی‌شود. رسانه خارجی در دسترس نیست."</string>
@@ -46,5 +46,5 @@
<string name="deselect_all" msgid="6348198946254776764">"لغو انتخاب همه"</string>
<string name="select_all" msgid="634074918366265804">"انتخاب همه"</string>
<string name="selected_count" msgid="2101564570019753277">"<xliff:g id="NUMBER">%1$d</xliff:g> مورد انتخاب شده از <xliff:g id="TOTAL">%2$d</xliff:g> مورد"</string>
- <string name="download_share_dialog" msgid="3355867339806448955">"اشتراک گذاری از طریق"</string>
+ <string name="download_share_dialog" msgid="3355867339806448955">"اشتراک‌گذاری از طریق"</string>
</resources>
diff --git a/ui/res/values-zh-rCN/strings.xml b/ui/res/values-zh-rCN/strings.xml
index d876d02d..ae003361 100644
--- a/ui/res/values-zh-rCN/strings.xml
+++ b/ui/res/values-zh-rCN/strings.xml
@@ -16,7 +16,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_label" msgid="3070921713463294774">"下载内容"</string>
+ <string name="app_label" msgid="3070921713463294774">"下载"</string>
<string name="download_title_sorted_by_date" msgid="5898014492155434221">"下载内容 - 按日期排序"</string>
<string name="download_title_sorted_by_size" msgid="1417193166677094813">"下载内容 - 按大小排序"</string>
<string name="no_downloads" msgid="1029667411186146836">"无下载内容。"</string>
diff --git a/ui/src/com/android/providers/downloads/ui/DownloadItem.java b/ui/src/com/android/providers/downloads/ui/DownloadItem.java
index 25f58638..e24ac4a4 100644
--- a/ui/src/com/android/providers/downloads/ui/DownloadItem.java
+++ b/ui/src/com/android/providers/downloads/ui/DownloadItem.java
@@ -18,6 +18,7 @@ package com.android.providers.downloads.ui;
import android.content.Context;
import android.util.AttributeSet;
+import android.view.accessibility.AccessibilityEvent;
import android.view.MotionEvent;
import android.widget.CheckBox;
import android.widget.Checkable;
@@ -100,6 +101,7 @@ public class DownloadItem extends GridLayout implements Checkable {
case MotionEvent.ACTION_UP:
if (mIsInDownEvent && event.getX() < CHECKMARK_AREA) {
toggle();
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
handled = true;
}
mIsInDownEvent = false;
diff --git a/ui/src/com/android/providers/downloads/ui/DownloadList.java b/ui/src/com/android/providers/downloads/ui/DownloadList.java
index 103d3f83..ed369932 100644
--- a/ui/src/com/android/providers/downloads/ui/DownloadList.java
+++ b/ui/src/com/android/providers/downloads/ui/DownloadList.java
@@ -32,6 +32,7 @@ import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Parcelable;
+import android.provider.BaseColumns;
import android.provider.Downloads;
import android.util.Log;
import android.util.SparseBooleanArray;
@@ -50,6 +51,9 @@ import android.widget.ExpandableListView.OnChildClickListener;
import android.widget.ListView;
import android.widget.Toast;
+import com.android.providers.downloads.Constants;
+import com.android.providers.downloads.OpenHelper;
+
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
@@ -499,7 +503,6 @@ public class DownloadList extends Activity {
* Send an Intent to open the download currently pointed to by the given cursor.
*/
private void openCurrentDownload(Cursor cursor) {
- final long id = cursor.getInt(mIdColumnId);
final Uri localUri = Uri.parse(cursor.getString(mLocalUriColumnId));
try {
getContentResolver().openFileDescriptor(localUri, "r").close();
@@ -512,20 +515,8 @@ public class DownloadList extends Activity {
// close() failed, not a problem
}
- final Uri viewUri;
- final String mimeType = cursor.getString(mMediaTypeColumnId);
- if ("application/vnd.android.package-archive".equals(mimeType)) {
- // PackageInstaller doesn't like content URIs, so open file
- viewUri = localUri;
- } else if ("file".equals(localUri.getScheme())) {
- viewUri = ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id);
- } else {
- viewUri = localUri;
- }
-
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.setDataAndType(viewUri, mimeType);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ final long id = cursor.getLong(cursor.getColumnIndexOrThrow(BaseColumns._ID));
+ final Intent intent = OpenHelper.buildViewIntent(this, id);
try {
startActivity(intent);
} catch (ActivityNotFoundException ex) {
@@ -634,15 +625,11 @@ public class DownloadList extends Activity {
.show();
}
- /**
- * TODO use constants/shared code?
- */
private void sendRunningDownloadClickedBroadcast(long id) {
- Intent intent = new Intent("android.intent.action.DOWNLOAD_LIST");
- intent.setClassName("com.android.providers.downloads",
- "com.android.providers.downloads.DownloadReceiver");
- intent.setData(ContentUris.withAppendedId(Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, id));
- intent.putExtra("multiple", false);
+ final Intent intent = new Intent(Constants.ACTION_LIST);
+ intent.setPackage(Constants.PROVIDER_PACKAGE_NAME);
+ intent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS,
+ new long[] { id });
sendBroadcast(intent);
}