summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk1
-rw-r--r--AndroidManifest.xml16
-rw-r--r--res/drawable-hdpi/ic_download_misc_file_type.pngbin0 -> 2405 bytes
-rw-r--r--res/drawable-mdpi/ic_download_misc_file_type.pngbin0 -> 1624 bytes
-rw-r--r--res/mipmap-hdpi/ic_launcher_download.pngbin9282 -> 10593 bytes
-rw-r--r--res/mipmap-mdpi/ic_launcher_download.pngbin5420 -> 23509 bytes
-rw-r--r--res/mipmap-xhdpi/ic_launcher_download.pngbin13962 -> 32416 bytes
-rw-r--r--res/mipmap-xxhdpi/ic_launcher_download.pngbin40279 -> 21228 bytes
-rw-r--r--res/values-af/cm_strings.xml20
-rw-r--r--res/values-ca/cm_strings.xml19
-rw-r--r--res/values-cs/strings.xml24
-rw-r--r--res/values-da/cm_strings.xml19
-rw-r--r--res/values-de/cm_strings.xml19
-rw-r--r--res/values-el/cm_strings.xml20
-rw-r--r--res/values-es/cm_strings.xml20
-rw-r--r--res/values-fi/cm_strings.xml19
-rw-r--r--res/values-fr/cm_strings.xml19
-rw-r--r--res/values-hu/cm_strings.xml19
-rw-r--r--res/values-it/cm_strings.xml19
-rw-r--r--res/values-ja/cm_strings.xml19
-rw-r--r--res/values-nb/cm_strings.xml19
-rw-r--r--res/values-nl/cm_strings.xml19
-rw-r--r--res/values-nl/strings.xml24
-rw-r--r--res/values-pl/cm_strings.xml19
-rw-r--r--res/values-pt-rBR/cm_strings.xml20
-rw-r--r--res/values-ru/cm_strings.xml19
-rw-r--r--res/values-sk/cm_strings.xml19
-rw-r--r--res/values-zh-rTW/cm_strings.xml19
-rw-r--r--res/values/cm_strings.xml19
-rw-r--r--src/com/android/providers/downloads/DownloadService.java5
-rw-r--r--src/com/android/providers/downloads/LiveFolderConfigActivity.java40
-rw-r--r--src/com/android/providers/downloads/LiveFolderReceiver.java143
-rw-r--r--src/com/android/providers/downloads/OpenHelper.java9
33 files changed, 604 insertions, 23 deletions
diff --git a/Android.mk b/Android.mk
index a2f1e961..36660718 100644
--- a/Android.mk
+++ b/Android.mk
@@ -10,6 +10,7 @@ LOCAL_PACKAGE_NAME := DownloadProvider
LOCAL_CERTIFICATE := media
LOCAL_PRIVILEGED_MODULE := true
LOCAL_STATIC_JAVA_LIBRARIES := guava
+LOCAL_STATIC_JAVA_LIBRARIES += org.cyanogenmod.support
include $(BUILD_PACKAGE)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 56cdb9c1..1e7f7897 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -103,6 +103,22 @@
</intent-filter>
</receiver>
+ <activity android:name=".LiveFolderConfigActivity" android:label="@string/live_folder_drawer_label"
+ android:permission="com.cyanogenmod.trebuchet.permission.MANAGE_LIVE_FOLDERS"
+ android:theme="@android:style/Theme.NoDisplay">
+ <intent-filter>
+ <action android:name="cyanogenmod.intent.action.CREATE_LIVE_FOLDER" />
+ </intent-filter>
+ </activity>
+
+ <receiver android:name=".LiveFolderReceiver"
+ android:permission="com.cyanogenmod.trebuchet.permission.MANAGE_LIVE_FOLDERS"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="cyanogenmod.intent.action.LIVE_FOLDER_UPDATES" />
+ </intent-filter>
+ </receiver>
+
<activity android:name=".SizeLimitActivity"
android:launchMode="singleTask"
android:theme="@style/Theme.Translucent"/>
diff --git a/res/drawable-hdpi/ic_download_misc_file_type.png b/res/drawable-hdpi/ic_download_misc_file_type.png
new file mode 100644
index 00000000..dab3b6e1
--- /dev/null
+++ b/res/drawable-hdpi/ic_download_misc_file_type.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_download_misc_file_type.png b/res/drawable-mdpi/ic_download_misc_file_type.png
new file mode 100644
index 00000000..ceed70cf
--- /dev/null
+++ b/res/drawable-mdpi/ic_download_misc_file_type.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_download.png b/res/mipmap-hdpi/ic_launcher_download.png
index 2450cfbb..3f092d39 100644
--- a/res/mipmap-hdpi/ic_launcher_download.png
+++ b/res/mipmap-hdpi/ic_launcher_download.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_download.png b/res/mipmap-mdpi/ic_launcher_download.png
index 7b56ada3..76652fb9 100644
--- a/res/mipmap-mdpi/ic_launcher_download.png
+++ b/res/mipmap-mdpi/ic_launcher_download.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_download.png b/res/mipmap-xhdpi/ic_launcher_download.png
index 775004f2..7d7b1b11 100644
--- a/res/mipmap-xhdpi/ic_launcher_download.png
+++ b/res/mipmap-xhdpi/ic_launcher_download.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_launcher_download.png b/res/mipmap-xxhdpi/ic_launcher_download.png
index ed8c7827..0921c124 100644
--- a/res/mipmap-xxhdpi/ic_launcher_download.png
+++ b/res/mipmap-xxhdpi/ic_launcher_download.png
Binary files differ
diff --git a/res/values-af/cm_strings.xml b/res/values-af/cm_strings.xml
new file mode 100644
index 00000000..c98f2571
--- /dev/null
+++ b/res/values-af/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Aflaai vouer</string>
+ <string name="live_folder_label">Aflaaie</string>
+</resources>
diff --git a/res/values-ca/cm_strings.xml b/res/values-ca/cm_strings.xml
new file mode 100644
index 00000000..04d4e180
--- /dev/null
+++ b/res/values-ca/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Carpeta Baixades</string>
+ <string name="live_folder_label">Baixades</string>
+</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index b8c37574..fe6eaf1c 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -17,21 +17,23 @@
<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">"Správce stahování"</string>
- <string name="permlab_downloadManager" msgid="7779544811202855500">"Získat přístup ke správci stahování."</string>
- <string name="permdesc_downloadManager" msgid="4237406545998908947">"Umožňuje aplikaci získat přístup do správce stahování a použít jej ke stahování souborů. Škodlivé aplikace mohou toto oprávnění použít k přerušení stahování a získání přístupu k soukromým údajům."</string>
+
+ <string name="permlab_downloadManager" msgid="7779544811202855500">"Přístup ke správci stahování."</string>
+ <string name="permdesc_downloadManager" msgid="4237406545998908947">"Umožní získat přístup do správce stahování a použít jej ke stahování souborů. Škodlivé aplikace mohou toto oprávnění použít k přerušení stahování a získání přístupu k soukromým údajům."</string>
<string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"Pokročilé funkce správce stahování."</string>
- <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Umožňuje aplikaci získat přístup k pokročilým funkcím správce stahování. Škodlivé aplikace mohou toto oprávnění použít k přerušení stahování a získání přístupu k soukromým údajům."</string>
+ <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Umožní získat přístup k pokročilým funkcím správce stahování. Škodlivé aplikace mohou toto oprávnění použít k přerušení stahování a získání přístupu k soukromým údajům."</string>
<string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"Odeslat oznámení o stahování."</string>
- <string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Umožňuje aplikaci odesílat oznámení o dokončení stahování. Škodlivé aplikace mohou pomocí těchto oprávnění zmást jiné aplikace, které stahují soubory."</string>
- <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Zobrazit stahování – USB"</string>
- <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Zobrazení všech položek stažených na kartu SD"</string>
- <string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Umožňuje aplikaci zobrazit všechny soubory stažené na kartu SD bez ohledu na aplikaci, pomocí které byly staženy."</string>
+ <string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Umožní odesílat oznámení o dokončení stahování. Škodlivé aplikace mohou pomocí těchto oprávnění zmást jiné aplikace, které stahují soubory."</string>
+ <string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Zobrazit stažené na USB"</string>
+ <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Zobrazení stažené na kartu SD"</string>
+ <string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Umožní zobrazit všechny soubory stažené na kartu SD nebo na úložiště USB bez ohledu na aplikaci, pomocí které byly staženy."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Rezervovat místo v mezipaměti stahování"</string>
- <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Umožňuje aplikaci stahovat soubory do mezipaměti stahování, kterou nelze automaticky vymazat, pokud správce stahování potřebuje více místa."</string>
- <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"stahování souborů bez upozornění"</string>
- <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Umožňuje aplikaci stahovat soubory prostřednictvím správce stahování bez oznámení uživateli."</string>
+ <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Umožní stahovat soubory do mezipaměti stahování, kterou nelze automaticky vymazat, pokud správce stahování potřebuje více místa."</string>
+ <string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"Stahovat soubory bez upozornění"</string>
+ <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Umožní stahovat soubory prostřednictvím správce stahování bez oznámení uživateli."</string>
<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="permdesc_accessAllDownloads" msgid="1871832254578267128">"Umožní 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_download_complete" msgid="5443563299253103667">"Stahování dokončeno."</string>
<string name="notification_download_failed" msgid="8612136111952014978">"Stahování bylo neúspěšné."</string>
diff --git a/res/values-da/cm_strings.xml b/res/values-da/cm_strings.xml
new file mode 100644
index 00000000..c69160b3
--- /dev/null
+++ b/res/values-da/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Download-mappe</string>
+ <string name="live_folder_label">Downloads</string>
+</resources>
diff --git a/res/values-de/cm_strings.xml b/res/values-de/cm_strings.xml
new file mode 100644
index 00000000..a027abbe
--- /dev/null
+++ b/res/values-de/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Download-Ordner</string>
+ <string name="live_folder_label">Downloads</string>
+</resources>
diff --git a/res/values-el/cm_strings.xml b/res/values-el/cm_strings.xml
new file mode 100644
index 00000000..e52d3c19
--- /dev/null
+++ b/res/values-el/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Φάκελος λήψεων</string>
+ <string name="live_folder_label">Λήψεις</string>
+</resources>
diff --git a/res/values-es/cm_strings.xml b/res/values-es/cm_strings.xml
new file mode 100644
index 00000000..5a6ded8f
--- /dev/null
+++ b/res/values-es/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <string name="live_folder_drawer_label">Carpeta de descargas</string>
+ <string name="live_folder_label">Descargas</string>
+</resources>
diff --git a/res/values-fi/cm_strings.xml b/res/values-fi/cm_strings.xml
new file mode 100644
index 00000000..2ff7a412
--- /dev/null
+++ b/res/values-fi/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Latauskansio</string>
+ <string name="live_folder_label">Lataukset</string>
+</resources>
diff --git a/res/values-fr/cm_strings.xml b/res/values-fr/cm_strings.xml
new file mode 100644
index 00000000..a348d3d1
--- /dev/null
+++ b/res/values-fr/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Dossier de téléchargements</string>
+ <string name="live_folder_label">Téléchargements</string>
+</resources>
diff --git a/res/values-hu/cm_strings.xml b/res/values-hu/cm_strings.xml
new file mode 100644
index 00000000..b98fdb71
--- /dev/null
+++ b/res/values-hu/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Letöltések mappa</string>
+ <string name="live_folder_label">Letöltések</string>
+</resources>
diff --git a/res/values-it/cm_strings.xml b/res/values-it/cm_strings.xml
new file mode 100644
index 00000000..e868525a
--- /dev/null
+++ b/res/values-it/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Cartella download</string>
+ <string name="live_folder_label">Download</string>
+</resources>
diff --git a/res/values-ja/cm_strings.xml b/res/values-ja/cm_strings.xml
new file mode 100644
index 00000000..cae522e9
--- /dev/null
+++ b/res/values-ja/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">ダウンロードフォルダ</string>
+ <string name="live_folder_label">ダウンロード</string>
+</resources>
diff --git a/res/values-nb/cm_strings.xml b/res/values-nb/cm_strings.xml
new file mode 100644
index 00000000..f3b7d3ec
--- /dev/null
+++ b/res/values-nb/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Nedlastingsmappe</string>
+ <string name="live_folder_label">Nedlastinger</string>
+</resources>
diff --git a/res/values-nl/cm_strings.xml b/res/values-nl/cm_strings.xml
new file mode 100644
index 00000000..2bf815d1
--- /dev/null
+++ b/res/values-nl/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Downloads-map</string>
+ <string name="live_folder_label">Downloads</string>
+</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 6f37aff9..da39b40b 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -1,5 +1,6 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+ Copyright (C) 2012 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -13,29 +14,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_label" msgid="3658948994665187911">"Downloadbeheer"</string>
- <string name="permlab_downloadManager" msgid="7779544811202855500">"Downloadbeheer weergeven."</string>
- <string name="permdesc_downloadManager" msgid="4237406545998908947">"Hiermee heeft de app toegang tot downloadbeheer en kan de app via downloadbeheer bestanden downloaden. Schadelijke apps kunnen dit gebruiken om downloads te verstoren en toegang te krijgen tot persoonlijke gegevens."</string>
- <string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"Geavanceerde functies van de downloadbeheerder."</string>
- <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Hiermee heeft de app toegang tot de geavanceerde functies van downloadbeheer. Schadelijke apps kunnen dit gebruiken om downloads te verstoren en toegang te krijgen tot persoonlijke gegevens."</string>
+ <string name="permlab_downloadManager" msgid="7779544811202855500">"Downloadbeheer tonen."</string>
+ <string name="permdesc_downloadManager" msgid="4237406545998908947">"Hiermee krijgt de app toegang tot Downloadbeheer en kan de app via Downloadbeheer bestanden downloaden. Schadelijke apps kunnen dit gebruiken om downloads te verstoren en toegang te krijgen tot persoonlijke gegevens."</string>
+ <string name="permlab_downloadManagerAdvanced" msgid="7103642833308809655">"Geavanceerde functies van Downloadbeheer."</string>
+ <string name="permdesc_downloadManagerAdvanced" msgid="2659546004160962761">"Hiermee krijgt de app toegang tot de geavanceerde functies van Downloadbeheer. Schadelijke apps kunnen dit gebruiken om downloads te verstoren en toegang te krijgen tot persoonlijke gegevens."</string>
<string name="permlab_downloadCompletedIntent" msgid="945913803765675685">"Downloadmeldingen verzenden."</string>
<string name="permdesc_downloadCompletedIntent" msgid="2094706189855699533">"Hiermee kan de app meldingen verzenden over voltooide downloads. Schadelijke apps kunnen dit gebruiken om andere apps die bestanden downloaden in verwarring te brengen."</string>
<string name="permlab_seeAllExternal" product="nosdcard" msgid="4084575448409212628">"Alle downloads naar USB-opslag bekijken"</string>
- <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Alle downloads naar SD-kaart weergeven"</string>
+ <string name="permlab_seeAllExternal" product="default" msgid="140058400609165726">"Alle downloads naar SD-kaart bekijken"</string>
<string name="permdesc_seeAllExternal" msgid="1672759909065511233">"Hiermee kan de app alle downloads op de SD-kaart zien, ongeacht welke app ze heeft gedownload."</string>
<string name="permlab_downloadCacheNonPurgeable" msgid="3069534308882047412">"Ruimte in de downloadcache reserveren"</string>
- <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Hiermee kan de app bestanden downloaden naar de downloadcache die niet automatisch kunnen worden verwijderd wanneer downloadbeheer meer ruimte nodig heeft."</string>
+ <string name="permdesc_downloadCacheNonPurgeable" msgid="2408760720334570420">"Hiermee kan de app bestanden downloaden naar de downloadcache die niet automatisch kunnen worden verwijderd wanneer Downloadbeheer meer ruimte nodig heeft."</string>
<string name="permlab_downloadWithoutNotification" msgid="8837971946078327262">"bestanden downloaden zonder melding"</string>
- <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Hiermee kan de app bestanden downloaden via downloadbeheer zonder dat de gebruiker een melding krijgt."</string>
+ <string name="permdesc_downloadWithoutNotification" msgid="8483135034298639727">"Hiermee kan de app bestanden downloaden via Downloadbeheer zonder dat de gebruiker een melding krijgt."</string>
<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="permdesc_accessAllDownloads" msgid="1871832254578267128">"Hiermee kan de app alle downloads bekijken en wijzigen die door een systeem-app zijn gestart."</string>
<string name="download_unknown_title" msgid="7015124071247271585">"&lt;Zonder titel&gt;"</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>
+ <string name="notification_need_wifi_for_size" msgid="2556172885154833575">"Wi-Fi vereist voor download"</string>
<string name="notification_paused_in_background" msgid="4328508073283591772">"Onderbr. op achtergrond."</string>
<string name="wifi_required_title" msgid="1995971416871498179">"Download te groot voor providernetwerk"</string>
<string name="wifi_required_body" msgid="3067694630143784449">"U moet wifi gebruiken om deze download van <xliff:g id="SIZE">%s </xliff:g> te voltooien. \n\nRaak <xliff:g id="QUEUE_TEXT">%s </xliff:g> aan om deze download te starten wanneer u verbinding heeft met een wifi-netwerk."</string>
diff --git a/res/values-pl/cm_strings.xml b/res/values-pl/cm_strings.xml
new file mode 100644
index 00000000..3756e56e
--- /dev/null
+++ b/res/values-pl/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Folder pobierania</string>
+ <string name="live_folder_label">Pobrane</string>
+</resources>
diff --git a/res/values-pt-rBR/cm_strings.xml b/res/values-pt-rBR/cm_strings.xml
new file mode 100644
index 00000000..b54b4ded
--- /dev/null
+++ b/res/values-pt-rBR/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Pasta de downloads</string>
+ <string name="live_folder_label">Downloads</string>
+</resources> \ No newline at end of file
diff --git a/res/values-ru/cm_strings.xml b/res/values-ru/cm_strings.xml
new file mode 100644
index 00000000..c26f59a9
--- /dev/null
+++ b/res/values-ru/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Папка загрузок</string>
+ <string name="live_folder_label">Загрузки</string>
+</resources>
diff --git a/res/values-sk/cm_strings.xml b/res/values-sk/cm_strings.xml
new file mode 100644
index 00000000..1ffb903a
--- /dev/null
+++ b/res/values-sk/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Priečinok pre prevzatia</string>
+ <string name="live_folder_label">Prevzatia</string>
+</resources>
diff --git a/res/values-zh-rTW/cm_strings.xml b/res/values-zh-rTW/cm_strings.xml
new file mode 100644
index 00000000..2c727357
--- /dev/null
+++ b/res/values-zh-rTW/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">下載資料夾</string>
+ <string name="live_folder_label">下載</string>
+</resources>
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml
new file mode 100644
index 00000000..30e80386
--- /dev/null
+++ b/res/values/cm_strings.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2012-2013 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="live_folder_drawer_label">Downloads folder</string>
+ <string name="live_folder_label">Downloads</string>
+</resources>
diff --git a/src/com/android/providers/downloads/DownloadService.java b/src/com/android/providers/downloads/DownloadService.java
index 7d746cca..0d4266fb 100644
--- a/src/com/android/providers/downloads/DownloadService.java
+++ b/src/com/android/providers/downloads/DownloadService.java
@@ -368,6 +368,10 @@ public class DownloadService extends Service {
PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_ONE_SHOT));
}
+ if (!isActive) {
+ LiveFolderReceiver.updateFolders(this, 0);
+ }
+
return isActive;
}
@@ -413,6 +417,7 @@ public class DownloadService extends Service {
deleteFileIfExists(info.mFileName);
}
mDownloads.remove(info.mId);
+ LiveFolderReceiver.updateFolders(this, 0);
}
private void deleteFileIfExists(String path) {
diff --git a/src/com/android/providers/downloads/LiveFolderConfigActivity.java b/src/com/android/providers/downloads/LiveFolderConfigActivity.java
new file mode 100644
index 00000000..cf8183e2
--- /dev/null
+++ b/src/com/android/providers/downloads/LiveFolderConfigActivity.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2013 The CyanogenMod 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.Activity;
+import android.content.ComponentName;
+import android.content.Intent;
+import android.os.Bundle;
+
+import org.cyanogenmod.support.ui.LiveFolder;
+
+public class LiveFolderConfigActivity extends Activity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ Intent i = new Intent();
+ // Set the receiver responsible for folder updates
+ ComponentName receiver = new ComponentName(this, LiveFolderReceiver.class);
+ i.putExtra(LiveFolder.Constants.FOLDER_RECEIVER_EXTRA, receiver);
+ i.putExtra(LiveFolder.Constants.FOLDER_TITLE_EXTRA, getString(R.string.live_folder_label));
+ setResult(RESULT_OK, i);
+ finish();
+ }
+
+}
diff --git a/src/com/android/providers/downloads/LiveFolderReceiver.java b/src/com/android/providers/downloads/LiveFolderReceiver.java
new file mode 100644
index 00000000..9f888c5b
--- /dev/null
+++ b/src/com/android/providers/downloads/LiveFolderReceiver.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2013 The CyanogenMod 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.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.net.Uri;
+import android.provider.BaseColumns;
+import android.text.TextUtils;
+
+import com.android.providers.downloads.OpenHelper;
+
+import org.cyanogenmod.support.ui.LiveFolder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LiveFolderReceiver extends BroadcastReceiver {
+
+ private static int sNumLiveFolders = 0;
+
+ private static Bitmap retrieveAndSetIcon(Context context, String mediaType) {
+ if (mediaType == null) {
+ return null;
+ }
+
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromParts("file", "", null), mediaType);
+
+ PackageManager pm = context.getPackageManager();
+ List<ResolveInfo> list = pm.queryIntentActivities(intent,
+ PackageManager.MATCH_DEFAULT_ONLY);
+
+ if (list.isEmpty()) {
+ return BitmapFactory.decodeResource(context.getResources(),
+ R.drawable.ic_download_misc_file_type);
+ } else {
+ Drawable d = list.get(0).activityInfo.loadIcon(pm);
+ return ((BitmapDrawable) d).getBitmap();
+ }
+ }
+
+ public static void updateFolders(Context context, long folderId) {
+ if (sNumLiveFolders == 0) {
+ return;
+ }
+
+ DownloadManager dm = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
+ dm.setAccessAllDownloads(true);
+
+ DownloadManager.Query baseQuery =
+ new DownloadManager.Query().setOnlyIncludeVisibleInDownloadsUi(true);
+ Cursor cursor = dm.query(baseQuery);
+ if (cursor == null) {
+ return;
+ }
+ ArrayList<LiveFolder.Item> folderItems = new ArrayList<LiveFolder.Item>();
+
+ while (cursor.moveToNext() && folderItems.size() < LiveFolder.Constants.MAX_ITEMS) {
+ long id = cursor.getLong(cursor.getColumnIndexOrThrow(BaseColumns._ID));
+ String title = cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_TITLE));
+ String mediaType =
+ cursor.getString(cursor.getColumnIndex(DownloadManager.COLUMN_MEDIA_TYPE));
+
+ LiveFolder.Item folderItem = new LiveFolder.Item();
+ folderItem.setLabel(title);
+ folderItem.setIcon(retrieveAndSetIcon(context, mediaType));
+ folderItem.setId((int) id);
+ folderItems.add(folderItem);
+ }
+
+ if (folderItems.isEmpty()) {
+ return;
+ }
+
+ if (folderId == 0) {
+ LiveFolder.updateAllFolders(context, folderItems);
+ } else {
+ LiveFolder.updateSingleFolder(context, folderId, folderItems);
+ }
+ }
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String type = intent.getStringExtra(LiveFolder.Constants.FOLDER_UPDATE_TYPE_EXTRA);
+
+ if (TextUtils.isEmpty(type)) {
+ return;
+ }
+
+ long folderId = intent.getLongExtra(LiveFolder.Constants.FOLDER_ID_EXTRA, 0);
+ if (folderId <= 0 && !type.equals(LiveFolder.Constants.EXISTING_FOLDERS_CREATED)) {
+ return;
+ }
+
+ if (type.equals(LiveFolder.Constants.NEW_FOLDER_CREATED)) {
+ sNumLiveFolders++;
+ updateFolders(context, folderId);
+ } else if (type.equals(LiveFolder.Constants.EXISTING_FOLDERS_CREATED)) {
+ long[] existingFolders = intent.getLongArrayExtra(
+ LiveFolder.Constants.EXISTING_FOLDER_IDS_EXTRA);
+ sNumLiveFolders = existingFolders.length;
+ updateFolders(context, 0);
+ } else if (type.equals(LiveFolder.Constants.FOLDER_ITEM_SELECTED)) {
+ int itemId = intent.getIntExtra(LiveFolder.Constants.FOLDER_ITEM_ID_EXTRA, 0);
+ OpenHelper.startViewIntent(context, itemId, Intent.FLAG_ACTIVITY_NEW_TASK);
+ } else if (type.equals(LiveFolder.Constants.FOLDER_ITEM_REMOVED)) {
+ // Get selected item id
+ int itemId = intent.getIntExtra(LiveFolder.Constants.FOLDER_ITEM_ID_EXTRA, 0);
+ DownloadManager dm =
+ (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
+
+ dm.setAccessAllDownloads(true);
+ dm.markRowDeleted(itemId);
+ } else if (type.equals(LiveFolder.Constants.FOLDER_DELETED)) {
+ sNumLiveFolders--;
+ }
+ }
+
+}
diff --git a/src/com/android/providers/downloads/OpenHelper.java b/src/com/android/providers/downloads/OpenHelper.java
index 4eb319c4..58c8ed69 100644
--- a/src/com/android/providers/downloads/OpenHelper.java
+++ b/src/com/android/providers/downloads/OpenHelper.java
@@ -18,6 +18,7 @@ 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_MEDIAPROVIDER_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;
@@ -88,6 +89,10 @@ public class OpenHelper {
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 (mimeType.startsWith("image/") && !isNull(cursor, COLUMN_MEDIAPROVIDER_URI)) {
+ final Uri mediaUri = getCursorUri(cursor, COLUMN_MEDIAPROVIDER_URI);
+ intent.setDataAndType(mediaUri, mimeType);
+ intent.putExtra("SingleItemOnly", true);
} else if ("file".equals(localUri.getScheme())) {
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
@@ -139,6 +144,10 @@ public class OpenHelper {
return -1;
}
+ private static Boolean isNull(Cursor cursor, String column) {
+ return cursor.isNull(cursor.getColumnIndexOrThrow(column));
+ }
+
private static String getCursorString(Cursor cursor, String column) {
return cursor.getString(cursor.getColumnIndexOrThrow(column));
}