25 |
--------------------------------------------------------------------------------
/ui/res/layout/list_group_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
25 |
--------------------------------------------------------------------------------
/ui/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/tests/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/tests/public_api_access/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/tests/permission/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
35 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/src/com/android/providers/downloads/ThreadingTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.providers.downloads;
18 |
19 | import android.app.DownloadManager;
20 | import android.test.suitebuilder.annotation.LargeTest;
21 |
22 | /**
23 | * Download manager tests that require multithreading.
24 | */
25 | @LargeTest
26 | public class ThreadingTest extends AbstractPublicApiTest {
27 | private static class FakeSystemFacadeWithThreading extends FakeSystemFacade {
28 | @Override
29 | public void startThread(Thread thread) {
30 | thread.start();
31 | }
32 | }
33 |
34 | public ThreadingTest() {
35 | super(new FakeSystemFacadeWithThreading());
36 | }
37 |
38 | @Override
39 | protected void tearDown() throws Exception {
40 | Thread.sleep(50); // give threads a chance to finish
41 | super.tearDown();
42 | }
43 |
44 | /**
45 | * Test for race conditions when the service is flooded with startService() calls while running
46 | * a download.
47 | */
48 | public void testFloodServiceWithStarts() throws Exception {
49 | enqueueResponse(HTTP_OK, FILE_CONTENT);
50 | Download download = enqueueRequest(getRequest());
51 | while (download.getStatus() != DownloadManager.STATUS_SUCCESSFUL) {
52 | startService(null);
53 | Thread.sleep(10);
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/com/android/providers/downloads/SystemFacade.java:
--------------------------------------------------------------------------------
1 |
2 | package com.android.providers.downloads;
3 |
4 | import android.app.Notification;
5 | import android.content.Intent;
6 | import android.content.pm.PackageManager.NameNotFoundException;
7 |
8 |
9 | interface SystemFacade {
10 | /**
11 | * @see System#currentTimeMillis()
12 | */
13 | public long currentTimeMillis();
14 |
15 | /**
16 | * @return Network type (as in ConnectivityManager.TYPE_*) of currently active network, or null
17 | * if there's no active connection.
18 | */
19 | public Integer getActiveNetworkType();
20 |
21 | /**
22 | * @see android.telephony.TelephonyManager#isNetworkRoaming
23 | */
24 | public boolean isNetworkRoaming();
25 |
26 | /**
27 | * @return maximum size, in bytes, of downloads that may go over a mobile connection; or null if
28 | * there's no limit
29 | */
30 | public Long getMaxBytesOverMobile();
31 |
32 | /**
33 | * @return recommended maximum size, in bytes, of downloads that may go over a mobile
34 | * connection; or null if there's no recommended limit. The user will have the option to bypass
35 | * this limit.
36 | */
37 | public Long getRecommendedMaxBytesOverMobile();
38 |
39 | /**
40 | * Send a broadcast intent.
41 | */
42 | public void sendBroadcast(Intent intent);
43 |
44 | /**
45 | * Returns true if the specified UID owns the specified package name.
46 | */
47 | public boolean userOwnsPackage(int uid, String pckg) throws NameNotFoundException;
48 |
49 | /**
50 | * Post a system notification to the NotificationManager.
51 | */
52 | public void postNotification(long id, Notification notification);
53 |
54 | /**
55 | * Cancel a system notification.
56 | */
57 | public void cancelNotification(long id);
58 |
59 | /**
60 | * Cancel all system notifications.
61 | */
62 | public void cancelAllNotifications();
63 |
64 | /**
65 | * Start a thread.
66 | */
67 | public void startThread(Thread thread);
68 | }
69 |
--------------------------------------------------------------------------------
/CleanSpec.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2007 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 |
16 | # If you don't need to do a full clean build but would like to touch
17 | # a file or delete some intermediate files, add a clean step to the end
18 | # of the list. These steps will only be run once, if they haven't been
19 | # run before.
20 | #
21 | # E.g.:
22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
24 | #
25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
26 | # files that are missing or have been moved.
27 | #
28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
29 | # Use $(OUT_DIR) to refer to the "out" directory.
30 | #
31 | # If you need to re-do something that's already mentioned, just copy
32 | # the command and add it to the bottom of the list. E.g., if a change
33 | # that you made last week required touching a file and a change you
34 | # made today requires touching the same file, just copy the old
35 | # touch step and add it to the end of the list.
36 | #
37 | # ************************************************
38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
39 | # ************************************************
40 |
41 | # For example:
42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
46 |
47 | # ************************************************
48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
49 | # ************************************************
50 |
--------------------------------------------------------------------------------
/ui/src/com/android/providers/downloads/ui/DateSortedDownloadAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | package com.android.providers.downloads.ui;
19 |
20 | import com.android.providers.downloads.ui.DownloadItem.DownloadSelectListener;
21 |
22 | import android.app.DownloadManager;
23 | import android.content.Context;
24 | import android.database.Cursor;
25 | import android.view.View;
26 | import android.view.ViewGroup;
27 | import android.widget.RelativeLayout;
28 |
29 | /**
30 | * Adapter for a date-sorted list of downloads. Delegates all the real work to
31 | * {@link DownloadAdapter}.
32 | */
33 | public class DateSortedDownloadAdapter extends DateSortedExpandableListAdapter {
34 | private DownloadAdapter mDelegate;
35 |
36 | public DateSortedDownloadAdapter(Context context, Cursor cursor,
37 | DownloadSelectListener selectionListener) {
38 | super(context, cursor,
39 | cursor.getColumnIndexOrThrow(DownloadManager.COLUMN_LAST_MODIFIED_TIMESTAMP));
40 | mDelegate = new DownloadAdapter(context, cursor, selectionListener);
41 | }
42 |
43 | @Override
44 | public View getChildView(int groupPosition, int childPosition,
45 | boolean isLastChild, View convertView, ViewGroup parent) {
46 | // The layout file uses a RelativeLayout, whereas the GroupViews use TextView.
47 | if (null == convertView || !(convertView instanceof RelativeLayout)) {
48 | convertView = mDelegate.newView();
49 | }
50 |
51 | // Bail early if the Cursor is closed.
52 | if (!moveCursorToChildPosition(groupPosition, childPosition)) {
53 | return convertView;
54 | }
55 |
56 | mDelegate.bindView(convertView);
57 | return convertView;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/tests/src/tests/http/RecordedRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tests.http;
18 |
19 | import java.util.List;
20 |
21 | /**
22 | * An HTTP request that came into the mock web server.
23 | */
24 | public final class RecordedRequest {
25 | private final String requestLine;
26 | private final List headers;
27 | private final List chunkSizes;
28 | private final int bodySize;
29 | private final byte[] body;
30 | private final int sequenceNumber;
31 |
32 | RecordedRequest(String requestLine, List headers, List chunkSizes,
33 | int bodySize, byte[] body, int sequenceNumber) {
34 | this.requestLine = requestLine;
35 | this.headers = headers;
36 | this.chunkSizes = chunkSizes;
37 | this.bodySize = bodySize;
38 | this.body = body;
39 | this.sequenceNumber = sequenceNumber;
40 | }
41 |
42 | public String getRequestLine() {
43 | return requestLine;
44 | }
45 |
46 | public List getHeaders() {
47 | return headers;
48 | }
49 |
50 | /**
51 | * Returns the sizes of the chunks of this request's body, or an empty list
52 | * if the request's body was empty or unchunked.
53 | */
54 | public List getChunkSizes() {
55 | return chunkSizes;
56 | }
57 |
58 | /**
59 | * Returns the total size of the body of this POST request (before
60 | * truncation).
61 | */
62 | public int getBodySize() {
63 | return bodySize;
64 | }
65 |
66 | /**
67 | * Returns the body of this POST request. This may be truncated.
68 | */
69 | public byte[] getBody() {
70 | return body;
71 | }
72 |
73 | /**
74 | * Returns the index of this request on its HTTP connection. Since a single
75 | * HTTP connection may serve multiple requests, each request is assigned its
76 | * own sequence number.
77 | */
78 | public int getSequenceNumber() {
79 | return sequenceNumber;
80 | }
81 |
82 | @Override public String toString() {
83 | return requestLine;
84 | }
85 |
86 | public String getMethod() {
87 | return getRequestLine().split(" ")[0];
88 | }
89 |
90 | public String getPath() {
91 | return getRequestLine().split(" ")[1];
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/tests/src/com/android/providers/downloads/FakeSystemFacade.java:
--------------------------------------------------------------------------------
1 | package com.android.providers.downloads;
2 |
3 | import android.app.Notification;
4 | import android.content.Intent;
5 | import android.content.pm.PackageManager.NameNotFoundException;
6 | import android.net.ConnectivityManager;
7 | import android.test.AssertionFailedError;
8 |
9 | import java.util.ArrayList;
10 | import java.util.HashMap;
11 | import java.util.LinkedList;
12 | import java.util.List;
13 | import java.util.Map;
14 | import java.util.Queue;
15 |
16 | public class FakeSystemFacade implements SystemFacade {
17 | long mTimeMillis = 0;
18 | Integer mActiveNetworkType = ConnectivityManager.TYPE_WIFI;
19 | boolean mIsRoaming = false;
20 | Long mMaxBytesOverMobile = null;
21 | Long mRecommendedMaxBytesOverMobile = null;
22 | List mBroadcastsSent = new ArrayList();
23 | Map mActiveNotifications = new HashMap();
24 | List mCanceledNotifications = new ArrayList();
25 | Queue mStartedThreads = new LinkedList();
26 |
27 | void incrementTimeMillis(long delta) {
28 | mTimeMillis += delta;
29 | }
30 |
31 | public long currentTimeMillis() {
32 | return mTimeMillis;
33 | }
34 |
35 | public Integer getActiveNetworkType() {
36 | return mActiveNetworkType;
37 | }
38 |
39 | public boolean isNetworkRoaming() {
40 | return mIsRoaming;
41 | }
42 |
43 | public Long getMaxBytesOverMobile() {
44 | return mMaxBytesOverMobile ;
45 | }
46 |
47 | public Long getRecommendedMaxBytesOverMobile() {
48 | return mRecommendedMaxBytesOverMobile ;
49 | }
50 |
51 | @Override
52 | public void sendBroadcast(Intent intent) {
53 | mBroadcastsSent.add(intent);
54 | }
55 |
56 | @Override
57 | public boolean userOwnsPackage(int uid, String pckg) throws NameNotFoundException {
58 | return true;
59 | }
60 |
61 | @Override
62 | public void postNotification(long id, Notification notification) {
63 | if (notification == null) {
64 | throw new AssertionFailedError("Posting null notification");
65 | }
66 | mActiveNotifications.put(id, notification);
67 | }
68 |
69 | @Override
70 | public void cancelNotification(long id) {
71 | Notification notification = mActiveNotifications.remove(id);
72 | if (notification != null) {
73 | mCanceledNotifications.add(notification);
74 | }
75 | }
76 |
77 | @Override
78 | public void cancelAllNotifications() {
79 | for (long id : mActiveNotifications.keySet()) {
80 | cancelNotification(id);
81 | }
82 | }
83 |
84 | @Override
85 | public void startThread(Thread thread) {
86 | mStartedThreads.add(thread);
87 | }
88 |
89 | public void runAllThreads() {
90 | while (!mStartedThreads.isEmpty()) {
91 | mStartedThreads.poll().run();
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/ui/res/layout/download_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
23 |
24 |
27 |
30 |
33 |
40 |
41 |
42 |
43 |
55 |
59 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/ui/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "下載"
20 | "下載檔案"
21 | "無下載檔案。"
22 | "<不明>"
23 | "依大小排序"
24 | "依時間排序"
25 | "已佇列"
26 | "進行中"
27 | "完成"
28 | "失敗"
29 | "檔案無法使用。"
30 | "下載失敗。"
31 |
32 |
33 | "檔案已排入之後要下載的佇列中。"
34 | "找不到下載的檔案。"
35 | "無法完成下載,外部儲存空間不足。"
36 | "無法完成下載,內部下載儲存空間不足。"
37 | "下載中斷,無法恢復下載。"
38 | "無法下載,目標位置已有相同檔案。"
39 | "無法下載,外部媒體無法使用。"
40 | "無法開啟檔案"
41 | "移除"
42 | "刪除"
43 | "保留"
44 | "取消"
45 | "重試"
46 | "取消選取"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "下载内容"
20 | "下载内容"
21 | "无下载内容。"
22 | "<未知>"
23 | "按大小排序"
24 | "按时间排序"
25 | "已加入队列"
26 | "正在下载"
27 | "已完成"
28 | "下载失败"
29 | "文件不可用"
30 | "该下载失败。"
31 |
32 |
33 | "该文件已加入队列,供以后下载。"
34 | "未找到已下载的文件。"
35 | "无法完成下载,外部存储器的空间不足。"
36 | "无法完成下载,内部下载存储器的空间不足。"
37 | "下载中断,无法继续进行。"
38 | "无法下载,目标文件已存在。"
39 | "无法下载,未安装外部媒体。"
40 | "无法打开文件"
41 | "删除"
42 | "删除"
43 | "保留"
44 | "取消"
45 | "重试"
46 | "清除所选项"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "ダウンロード"
20 | "ダウンロード"
21 | "ダウンロードはありません。"
22 | "<不明>"
23 | "サイズ順"
24 | "時間順"
25 | "キューに登録"
26 | "処理中"
27 | "完了"
28 | "失敗"
29 | "ファイルを利用できません"
30 | "このダウンロードは失敗しました。"
31 |
32 |
33 | "このファイルはダウンロード待機中です。"
34 | "ダウンロードしたファイルが見つかりません。"
35 | "ダウンロードを完了できません。外部ストレージに十分な空き領域がありません。"
36 | "ダウンロードを完了できません。内部ダウンロードストレージに十分な空き領域がありません。"
37 | "ダウンロードが中断されました。再開はできません。"
38 | "ダウンロードできません。対象ファイルは既に存在しています。"
39 | "ダウンロードできません。外部メディアがありません。"
40 | "ファイルを開けません"
41 | "削除"
42 | "削除"
43 | "継続"
44 | "キャンセル"
45 | "再試行"
46 | "選択を解除"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "다운로드"
20 | "다운로드"
21 | "다운로드 항목이 없습니다."
22 | "<알 수 없음>"
23 | "크기별 정렬"
24 | "시간별 정렬"
25 | "대기 중"
26 | "진행 중"
27 | "완료"
28 | "실패"
29 | "파일이 없습니다."
30 | "다운로드에 실패했습니다."
31 |
32 |
33 | "다음 다운로드를 위해 파일이 대기 중입니다."
34 | "다운로드한 파일을 찾지 못했습니다."
35 | "다운로드를 완료할 수 없습니다. 외부 저장소에 공간이 부족합니다."
36 | "다운로드를 완료할 수 없습니다. 내부 다운로드 저장소에 공간이 부족합니다."
37 | "다운로드가 중단되었으며 다시 시작할 수 없습니다."
38 | "다운로드할 수 없습니다. 대상 파일이 이미 있습니다."
39 | "다운로드할 수 없습니다. 외부 미디어를 사용할 수 없습니다."
40 | "파일을 열 수 없음"
41 | "삭제"
42 | "삭제"
43 | "유지"
44 | "취소"
45 | "다시 시도"
46 | "선택 취소"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Stahování"
20 | "Stahování"
21 | "Žádná stahování"
22 | "<Neznámé>"
23 | "Řadit podle velikosti"
24 | "Seřadit podle času"
25 | "Ve frontě"
26 | "Probíhá"
27 | "Dokončeno"
28 | "Neúspěšné"
29 | "Soubor není dostupný"
30 | "Toto stažení se nezdařilo."
31 |
32 |
33 | "Tento soubor je ve frontě stahování."
34 | "Stažený soubor nelze nalézt."
35 | "Stahování nelze dokončit. V externím úložišti není dostatek místa."
36 | "Stahování nelze dokončit. V interním úložišti pro stahování není dostatek místa."
37 | "Stahování bylo přerušeno a nelze v něm pokračovat."
38 | "Nelze stáhnout. Cílový soubor již existuje."
39 | "Nelze stáhnout. Externí médium není k dispozici."
40 | "Soubor nelze otevřít"
41 | "Odebrat"
42 | "Smazat"
43 | "Zachovat"
44 | "Zrušit"
45 | "Zkusit znovu"
46 | "Zrušit výběr všech"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Загрузки"
20 | "Загрузки"
21 | "Нет загрузок."
22 | "<Неизвестно>"
23 | "Сортировать по размеру"
24 | "Сортировать по времени"
25 | "В очереди"
26 | "В процессе"
27 | "Завершено"
28 | "Не удалось"
29 | "Файл недоступен"
30 | "Не удалось выполнить загрузку."
31 |
32 |
33 | "Файл добавлен в очередь загрузки."
34 | "Не удалось найти загруженный файл."
35 | "Невозможно завершить загрузку. На внешнем носителе не хватает места."
36 | "Невозможно завершить загрузку. Во встроенной памяти не хватает места."
37 | "Загрузка прервана и не может быть возобновлена."
38 | "Невозможно загрузить. Такой файл уже существует."
39 | "Невозможно загрузить. Внешний носитель не подключен."
40 | "Невозможно открыть файл"
41 | "Удалить"
42 | "Удалить"
43 | "Сохранить"
44 | "Отмена"
45 | "Повторить"
46 | "Снять выделение"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Downloads"
20 | "Downloads"
21 | "Ingen downloads."
22 | "<Ukendt>"
23 | "Sorter efter størrelse"
24 | "Sorter efter tid"
25 | "I kø"
26 | "I gang"
27 | "Fuldført"
28 | "Mislykket"
29 | "Filen er ikke tilgængelig"
30 | "Denne download mislykkedes."
31 |
32 |
33 | "Filen downloades senere."
34 | "Den downloadede fil blev ikke fundet."
35 | "Download kan ikke afsluttes. Der er ikke nok plads på det eksterne lager."
36 | "Download kan ikke afsluttes. Der er ikke nok plads på det interne lager."
37 | "Download blev afbrudt. Den kan ikke genoptages."
38 | "Der kan ikke downloades. Destinationsfilen findes allerede."
39 | "Der kan ikke downloades. Det eksterne medie er ikke tilgængeligt."
40 | "Filen kan ikke åbnes"
41 | "Fjern"
42 | "Slet"
43 | "Behold"
44 | "Annuller"
45 | "Prøv igen"
46 | "Ryd valgte"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "İndirilenler"
20 | "İndirilenler"
21 | "İndirilen öğe yok."
22 | "<Bilinmiyor>"
23 | "Boyuta göre sırala"
24 | "Saate göre sırala"
25 | "Kuyrğ alndı"
26 | "Dvm ediyor"
27 | "Tamamlandı"
28 | "Başarısız"
29 | "Dosya kullanılamıyor"
30 | "İndirme işlemi başarısız oldu."
31 |
32 |
33 | "Bu dosya daha sonra indirilmek üzere kuyruğa alındı."
34 | "İndirilen dosya bulunamadı."
35 | "İndirme işlemi tamamlanamıyor. Harici depolama biriminde yeterli alan yok."
36 | "İndirme işlemi tamamlanamıyor. Dahili indirme depolama biriminde yeterli alan yok."
37 | "İndirme işlemi kesintiye uğradı. Sürdürülemez."
38 | "İndirilemiyor. Hedef dosya zaten var."
39 | "İndirilemiyor. Harici medya kullanılamıyor."
40 | "Dosya açılamıyor"
41 | "Kaldır"
42 | "Sil"
43 | "Sakla"
44 | "İptal"
45 | "Tekrar Dene"
46 | "Seçimi temizle"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Nedlastinger"
20 | "Nedlastinger"
21 | "Ingen nedlastinger."
22 | "<Ukjent>"
23 | "Sorter etter størrelse"
24 | "Sortér etter tid"
25 | "I kø"
26 | "Arbeider"
27 | "Fullført"
28 | "Mislyktes"
29 | "Filen er ikke tilgj."
30 | "Nedlastingen mislyktes."
31 |
32 |
33 | "Filen er satt i kø for nedlasting."
34 | "Finner ikke den nedlastede filen."
35 | "Kan ikke fullføre nedlastingen. Det er ikke tilstrekkelig plass på ekstern lagringsenhet."
36 | "Kan ikke fullføre nedlastingen. Det er ikke tilstrekkelig plass på intern lagringsenhet."
37 | "Nedlasting avbrutt. Den kan ikke gjenopptas."
38 | "Kan ikke laste ned. Målfilen finnes allerede."
39 | "Kan ikke laste ned. Eksternt medium er ikke tilgjengelig."
40 | "Kan ikke åpne filen"
41 | "Fjern"
42 | "Slett"
43 | "Behold"
44 | "Avbryt"
45 | "Prøv på nytt"
46 | "Slett valg"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-es-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Descargas"
20 | "Descargas"
21 | "No hay descargas."
22 | "<Desconocido>"
23 | "Ordenar por tamaño"
24 | "Ordenar por horario"
25 | "Citado"
26 | "En progreso"
27 | "Completa"
28 | "Error"
29 | "Error en la descarga"
30 | "¿Deseas intentar descargar el archivo más tarde o eliminarlo de la cola?"
31 | "Archivo no disponible aún"
32 | "Este archivo está en cola para descargas futuras."
33 | "No podemos encontrar el archivo que se descargó."
34 | "No se puede finalizar la descarga. No hay suficiente espacio de almacenamiento externo."
35 | "No se puede finalizar la descarga. No hay suficiente espacio de almacenamiento interno."
36 | "Descarga interrumpida. No se puede retomar."
37 | "No se puede descargar. El archivo de destino ya existe."
38 | "No se puede descargar. El archivo multimedia externo no está disponible."
39 | "No se puede abrir el archivo."
40 | "Eliminar"
41 | "Eliminar"
42 | "Conservar"
43 | "Cancelar"
44 | "Intentar nuevamente"
45 | "Borrar selección"
46 |
47 |
--------------------------------------------------------------------------------
/ui/res/values-nl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Downloads"
20 | "Downloads"
21 | "Geen downloads."
22 | "<Onbekend>"
23 | "Sorteren op grootte"
24 | "Sorteren op tijd"
25 | "In wachtrij"
26 | "Bezig"
27 | "Voltooid"
28 | "Mislukt"
29 | "Bestand niet beschikbaar"
30 | "Deze download is mislukt."
31 |
32 |
33 | "Het bestand staat in de wachtrij om later te worden gedownload."
34 | "Kan het gedownloade bestand niet vinden."
35 | "Kan download niet voltooien. Er is onvoldoende externe opslagruimte vrij."
36 | "Kan download niet voltooien. Er is onvoldoende interne opslagruimte vrij."
37 | "Download is onderbroken en kan niet worden voortgezet."
38 | "Kan niet downloaden. Het bestemmingsbestand bestaat al."
39 | "Kan niet downloaden. Externe media niet beschikbaar."
40 | "Kan bestand niet openen"
41 | "Verwijderen"
42 | "Verwijderen"
43 | "Houden"
44 | "Annuleren"
45 | "Opnieuw proberen"
46 | "Selectie wissen"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Pobrane"
20 | "Pobrane"
21 | "Brak pobranych plików."
22 | "<Nieznane>"
23 | "Sortuj według rozmiaru"
24 | "Sortuj według godziny"
25 | "W kolejce"
26 | "W toku"
27 | "Ukończono"
28 | "Błąd"
29 | "Plik jest niedostępny"
30 | "To pobranie nie powiodło się."
31 |
32 |
33 | "Ten plik jest w kolejce do pobrania w przyszłości."
34 | "Nie można znaleźć pobranego pliku."
35 | "Nie można ukończyć pobierania. Brak wystarczającej ilości miejsca w pamięci zewnętrznej."
36 | "Nie można ukończyć pobierania. Brak wystarczającej ilości miejsca w wewnętrznej pamięci pobierania."
37 | "Pobieranie przerwane. Nie może zostać wznowione."
38 | "Nie można pobrać. Plik docelowy już istnieje."
39 | "Nie można pobrać. Zewnętrzny nośnik nie jest dostępny."
40 | "Nie można otworzyć pliku"
41 | "Usuń"
42 | "Usuń"
43 | "Zachowaj"
44 | "Anuluj"
45 | "Ponów próbę"
46 | "Usuń zaznaczenie"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Hämtningar"
20 | "Hämtningar"
21 | "Inga hämtningar."
22 | "<Okänd>"
23 | "Sortera efter storlek"
24 | "Sortera efter tid"
25 | "I kö"
26 | "Bearbetas"
27 | "Slutförd"
28 | "Misslyckad"
29 | "Filen är inte tillgänglig"
30 | "Hämtningen misslyckades."
31 |
32 |
33 | "Filen står i kö och hämtas senare."
34 | "Den hämtade filen hittades inte."
35 | "Det går inte att slutföra hämtningen. Det finns inte tillräckligt med utrymme på den externa lagringsenheten."
36 | "Det går inte att slutföra hämtningen. Det finns inte tillräckligt med internt lagringsutrymme."
37 | "Hämtningen avbröts. Den kan inte återupptas."
38 | "Det går inte att hämta. Målfilen finns redan."
39 | "Det går inte att hämta. Externa media är inte tillgängliga."
40 | "Det går inte att öppna filen"
41 | "Ta bort"
42 | "Ta bort"
43 | "Behåll"
44 | "Avbryt"
45 | "Försök igen"
46 | "Ta bort markerade"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Descargas"
20 | "Descargas"
21 | "No hay descargas."
22 | "<Desconocido>"
23 | "Ordenar por tamaño"
24 | "Ordenar por hora"
25 | "En cola"
26 | "En curso"
27 | "Completada"
28 | "Con error"
29 | "Error en la descarga"
30 | "¿Deseas volver a intentar descargar el archivo más tarde o prefieres eliminarlo de la cola?"
31 | "Archivo no disponible"
32 | "Este archivo está en cola para descargarlo más tarde."
33 | "No se puede encontrar el archivo descargado."
34 | "No se puede completar la descarga porque no hay suficiente espacio de almacenamiento externo."
35 | "No se puede completar la descarga porque no hay suficiente espacio de almacenamiento interno."
36 | "La descarga se ha interrumpido y no se puede reanudar."
37 | "No se puede realizar la descarga porque el archivo de destino ya existe."
38 | "No se puede realizar la descarga porque el medio externo no está disponible."
39 | "No se puede abrir el archivo."
40 | "Quitar"
41 | "Eliminar"
42 | "Conservar"
43 | "Cancelar"
44 | "Reintentar"
45 | "Borrar selección"
46 |
47 |
--------------------------------------------------------------------------------
/ui/res/values-it/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Download"
20 | "Download"
21 | "Nessun download."
22 | "<Sconosciuto>"
23 | "Ordina per dimensioni"
24 | "Ordina per orario"
25 | "In coda"
26 | "In corso"
27 | "Completato"
28 | "Non riuscito"
29 | "File non disponibile"
30 | "Questo download non è riuscito."
31 |
32 |
33 | "Questo file è in coda per un futuro download."
34 | "Impossibile trovare il file scaricato."
35 | "Impossibile terminare il download. Spazio insufficiente nella memoria esterna."
36 | "Impossibile terminare il download. Spazio insufficiente nella memoria interna per i download."
37 | "Download interrotto. Impossibile ripristinarlo."
38 | "Impossibile eseguire il download. File di destinazione già esistente."
39 | "Impossibile eseguire il download. Il supporto esterno non è disponibile."
40 | "Impossibile aprire il file"
41 | "Rimuovi"
42 | "Elimina"
43 | "Conserva"
44 | "Annulla"
45 | "Riprova"
46 | "Annulla selezione"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-el/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Λήψεις"
20 | "Λήψεις"
21 | "Καμία λήψη."
22 | "<Άγνωστο>"
23 | "Ταξινόμηση βάσει μεγέθους"
24 | "Ταξινόμηση κατά ώρα"
25 | "Σε ουρά"
26 | "Σε εξέλιξη"
27 | "Ολοκληρ."
28 | "Αποτυχία"
29 | "Μη διαθέσιμο αρχείο"
30 | "Αυτή η λήψη δεν ήταν επιτυχής."
31 |
32 |
33 | "Αυτό το αρχείο είναι στην ουρά για μελλοντική λήψη."
34 | "Δεν είναι δυνατή η εύρεση του αρχείου λήψης."
35 | "Δεν είναι δυνατή η ολοκλήρωση της λήψης. Δεν υπάρχει αρκετός χώρος στο εξωτερικό μέσο αποθήκευσης."
36 | "Δεν είναι δυνατή η ολοκλήρωση της λήψης. Δεν υπάρχει αρκετός χώρος στο εσωτερικό μέσο αποθήκευσης λήψεων."
37 | "Η λήψη διακόπηκε. Δεν είναι δυνατή η συνέχισή της."
38 | "Δεν είναι δυνατή η λήψη. Το αρχείο προορισμού υπάρχει ήδη."
39 | "Δεν είναι δυνατή η λήψη. Το εξωτερικό μέσο δεν είναι διαθέσιμο."
40 | "Δεν είναι δυνατό το άνοιγμα του αρχείου"
41 | "Κατάργηση"
42 | "Διαγραφή"
43 | "Διατήρηση"
44 | "Άκυρο"
45 | "Επανάληψη"
46 | "Εκκαθάριση επιλογής"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Downloads"
20 | "Downloads"
21 | "Nenhum download."
22 | "<Desconhecido>"
23 | "Classificar por tamanho"
24 | "Classificar por horário"
25 | "Na fila"
26 | "Em andamen."
27 | "Concluído"
28 | "Falha"
29 | "Arquivo não disponível"
30 | "Falha no download."
31 |
32 |
33 | "Este arquivo está na fila para download no futuro."
34 | "Não foi possível encontrar o arquivo carregado."
35 | "Não foi possível concluir o download. Não há espaço suficiente no armazenamento externo."
36 | "Não foi possível concluir o download. Não há espaço suficiente no armazenamento de download interno."
37 | "Download interrompido. Não é possível retomar."
38 | "Não foi possível fazer o download. O arquivo de destino já existe."
39 | "Não foi possível fazer o download. A mídia externa não está disponível."
40 | "Não é possível abrir o arquivo"
41 | "Remover"
42 | "Excluir"
43 | "Manter"
44 | "Cancelar"
45 | "Tentar novamente"
46 | "Limpar seleção"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-pt-rPT/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Transferências"
20 | "Transferências"
21 | "Não há transferências."
22 | "<Desconhecido>"
23 | "Ordenar por tamanho"
24 | "Ordenar por hora"
25 | "Em fila"
26 | "Em curso"
27 | "Concluído"
28 | "Falhou"
29 | "Ficheiro não disponível"
30 | "Esta transferência não teve êxito."
31 |
32 |
33 | "O ficheiro está colocado em fila para uma futura transferência."
34 | "Não é possível encontrar o ficheiro transferido."
35 | "Não é possível concluir a transferência; o armazenamento externo não tem espaço suficiente."
36 | "Não é possível concluir a transferência; o armazenamento interno de transferências não tem espaço suficiente."
37 | "A transferência foi interrompida e não pode ser retomada."
38 | "Não é possível transferir; o ficheiro de destino já existe."
39 | "Não é possível transferir; o suporte de dados externo não está disponível."
40 | "Não é possível abrir o ficheiro"
41 | "Remover"
42 | "Eliminar"
43 | "Manter"
44 | "Cancelar"
45 | "Tentar novamente"
46 | "Limpar selecção"
47 |
48 |
--------------------------------------------------------------------------------
/ui/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Téléchargements"
20 | "Téléchargements"
21 | "Aucun téléchargement"
22 | "<Inconnu>"
23 | "Trier par taille"
24 | "Trier par date"
25 | "Ajouté à la file d\'attente"
26 | "En cours…"
27 | "Terminé"
28 | "Échec"
29 | "Échec du téléchargement"
30 | "Souhaitez-vous réessayer de télécharger le fichier ultérieurement ou préférez-vous le supprimer de la file d\'attente ?"
31 | "Fichier indisponible"
32 | "Ce fichier est mis en file d\'attente et sera téléchargé ultérieurement."
33 | "Le fichier téléchargé est introuvable."
34 | "Impossible de terminer le téléchargement. L\'espace disponible sur le support de stockage externe est insuffisant."
35 | "Impossible de terminer le téléchargement. L\'espace disponible sur le support de stockage interne est insuffisant."
36 | "Téléchargement interrompu. Impossible de reprendre le téléchargement."
37 | "Téléchargement impossible. Le fichier de destination existe déjà."
38 | "Téléchargement impossible. Le support externe n\'est pas disponible."
39 | "Impossible d\'ouvrir le fichier."
40 | "Supprimer"
41 | "Supprimer"
42 | "Conserver"
43 | "Annuler"
44 | "Réessayer"
45 | "Annuler la sélection"
46 |
47 |
--------------------------------------------------------------------------------
/ui/res/values-de/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Downloads"
20 | "Downloads"
21 | "Keine Downloads"
22 | "<Unbekannt>"
23 | "Nach Größe sortieren"
24 | "Zeitlich sortieren"
25 | "Eingereiht"
26 | "Läuft"
27 | "Fertig"
28 | "Fehler"
29 | "Datei nicht verfügbar"
30 | "Dieser Download ist fehlgeschlagen."
31 |
32 |
33 | "Diese Datei wurde zum späteren Download in die Warteschlange gestellt."
34 | "Die heruntergeladene Datei kann nicht gefunden werden."
35 | "Der Download kann nicht abgeschlossen werden, da der Speicherplatz des externen Speichers nicht ausreicht."
36 | "Der Download kann nicht abgeschlossen werden, da der Speicherplatz des internen Downloadspeichers nicht ausreicht."
37 | "Der Download wurde unterbrochen und kann nicht fortgesetzt werden."
38 | "Der Download ist nicht möglich, da die Zieldatei bereits vorhanden ist."
39 | "Der Download ist nicht möglich, da das externe Speichermedium nicht vorhanden ist."
40 | "Datei kann nicht geöffnet werden."
41 | "Entfernen"
42 | "Löschen"
43 | "Beibehalten"
44 | "Abbrechen"
45 | "Wiederholen"
46 | "Auswahl aufheben"
47 |
48 |
--------------------------------------------------------------------------------
/ui/src/com/android/providers/downloads/ui/DownloadItem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.providers.downloads.ui;
18 |
19 | import android.content.Context;
20 | import android.util.AttributeSet;
21 | import android.view.MotionEvent;
22 | import android.widget.CheckBox;
23 | import android.widget.RelativeLayout;
24 |
25 | /**
26 | * This class customizes RelativeLayout to directly handle clicks on the left part of the view and
27 | * treat them at clicks on the checkbox. This makes rapid selection of many items easier. This class
28 | * also keeps an ID associated with the currently displayed download and notifies a listener upon
29 | * selection changes with that ID.
30 | */
31 | public class DownloadItem extends RelativeLayout {
32 | private static float CHECKMARK_AREA = -1;
33 |
34 | private boolean mIsInDownEvent = false;
35 | private CheckBox mCheckBox;
36 | private long mDownloadId;
37 | private DownloadSelectListener mListener;
38 |
39 | static interface DownloadSelectListener {
40 | public void onDownloadSelectionChanged(long downloadId, boolean isSelected);
41 | public boolean isDownloadSelected(long id);
42 | }
43 |
44 | public DownloadItem(Context context, AttributeSet attrs, int defStyle) {
45 | super(context, attrs, defStyle);
46 | initialize();
47 | }
48 |
49 | public DownloadItem(Context context, AttributeSet attrs) {
50 | super(context, attrs);
51 | initialize();
52 | }
53 |
54 | public DownloadItem(Context context) {
55 | super(context);
56 | initialize();
57 | }
58 |
59 | private void initialize() {
60 | if (CHECKMARK_AREA == -1) {
61 | CHECKMARK_AREA = getResources().getDimensionPixelSize(R.dimen.checkmark_area);
62 | }
63 | }
64 |
65 | @Override
66 | protected void onFinishInflate() {
67 | super.onFinishInflate();
68 | mCheckBox = (CheckBox) findViewById(R.id.download_checkbox);
69 | }
70 |
71 | public void setDownloadId(long downloadId) {
72 | mDownloadId = downloadId;
73 | }
74 |
75 | public void setSelectListener(DownloadSelectListener listener) {
76 | mListener = listener;
77 | }
78 |
79 | @Override
80 | public boolean onTouchEvent(MotionEvent event) {
81 | boolean handled = false;
82 | switch(event.getAction()) {
83 | case MotionEvent.ACTION_DOWN:
84 | if (event.getX() < CHECKMARK_AREA) {
85 | mIsInDownEvent = true;
86 | handled = true;
87 | }
88 | break;
89 |
90 | case MotionEvent.ACTION_CANCEL:
91 | mIsInDownEvent = false;
92 | break;
93 |
94 | case MotionEvent.ACTION_UP:
95 | if (mIsInDownEvent && event.getX() < CHECKMARK_AREA) {
96 | toggleCheckMark();
97 | handled = true;
98 | }
99 | mIsInDownEvent = false;
100 | break;
101 | }
102 |
103 | if (handled) {
104 | postInvalidate();
105 | } else {
106 | handled = super.onTouchEvent(event);
107 | }
108 |
109 | return handled;
110 | }
111 |
112 | private void toggleCheckMark() {
113 | mCheckBox.toggle();
114 | mListener.onDownloadSelectionChanged(mDownloadId, mCheckBox.isChecked());
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.providers.downloads;
18 |
19 | import android.app.DownloadManager;
20 | import android.database.Cursor;
21 | import android.net.Uri;
22 | import android.os.ParcelFileDescriptor;
23 |
24 | import java.io.FileInputStream;
25 | import java.io.InputStream;
26 | import java.net.MalformedURLException;
27 |
28 | /**
29 | * Code common to tests that use the download manager public API.
30 | */
31 | public abstract class AbstractPublicApiTest extends AbstractDownloadManagerFunctionalTest {
32 |
33 | class Download {
34 | final long mId;
35 |
36 | private Download(long downloadId) {
37 | this.mId = downloadId;
38 | }
39 |
40 | public int getStatus() {
41 | return (int) getLongField(DownloadManager.COLUMN_STATUS);
42 | }
43 |
44 | String getStringField(String field) {
45 | Cursor cursor = mManager.query(new DownloadManager.Query().setFilterById(mId));
46 | try {
47 | assertEquals(1, cursor.getCount());
48 | cursor.moveToFirst();
49 | return cursor.getString(cursor.getColumnIndexOrThrow(field));
50 | } finally {
51 | cursor.close();
52 | }
53 | }
54 |
55 | long getLongField(String field) {
56 | Cursor cursor = mManager.query(new DownloadManager.Query().setFilterById(mId));
57 | try {
58 | assertEquals(1, cursor.getCount());
59 | cursor.moveToFirst();
60 | return cursor.getLong(cursor.getColumnIndexOrThrow(field));
61 | } finally {
62 | cursor.close();
63 | }
64 | }
65 |
66 | String getContents() throws Exception {
67 | ParcelFileDescriptor downloadedFile = mManager.openDownloadedFile(mId);
68 | assertTrue("Invalid file descriptor: " + downloadedFile,
69 | downloadedFile.getFileDescriptor().valid());
70 | InputStream stream = new FileInputStream(downloadedFile.getFileDescriptor());
71 | try {
72 | return readStream(stream);
73 | } finally {
74 | stream.close();
75 | }
76 | }
77 |
78 | void runUntilStatus(int status) throws Exception {
79 | runService();
80 | assertEquals(status, getStatus());
81 | }
82 | }
83 |
84 | protected static final String PACKAGE_NAME = "my.package.name";
85 | protected static final String REQUEST_PATH = "/path";
86 |
87 | protected DownloadManager mManager;
88 |
89 | public AbstractPublicApiTest(FakeSystemFacade systemFacade) {
90 | super(systemFacade);
91 | }
92 |
93 | @Override
94 | protected void setUp() throws Exception {
95 | super.setUp();
96 | mManager = new DownloadManager(mResolver, PACKAGE_NAME);
97 | }
98 |
99 | protected DownloadManager.Request getRequest() throws MalformedURLException {
100 | return getRequest(getServerUri(REQUEST_PATH));
101 | }
102 |
103 | protected DownloadManager.Request getRequest(String path) {
104 | return new DownloadManager.Request(Uri.parse(path));
105 | }
106 |
107 | protected Download enqueueRequest(DownloadManager.Request request) {
108 | return new Download(mManager.enqueue(request));
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/ui/res/layout/download_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
27 |
28 |
29 |
30 |
38 |
39 |
46 |
47 |
56 |
64 |
65 |
72 |
73 |
80 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/tests/permission/src/com/android/providers/downloads/permission/tests/DownloadProviderPermissionsTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.providers.downloads.permission.tests;
18 |
19 | import java.io.FileNotFoundException;
20 | import java.io.FileOutputStream;
21 | import java.io.IOException;
22 |
23 | import android.content.ContentResolver;
24 | import android.content.ContentValues;
25 | import android.content.Intent;
26 | import android.provider.Downloads;
27 | import android.test.AndroidTestCase;
28 | import android.test.suitebuilder.annotation.MediumTest;
29 |
30 | /**
31 | * Verify that protected Download provider actions require specific permissions.
32 | *
33 | * TODO: consider adding test where app has ACCESS_DOWNLOAD_MANAGER, but not
34 | * ACCESS_DOWNLOAD_MANAGER_ADVANCED
35 | */
36 | public class DownloadProviderPermissionsTest extends AndroidTestCase {
37 |
38 | private ContentResolver mContentResolver;
39 |
40 | @Override
41 | protected void setUp() throws Exception {
42 | super.setUp();
43 | mContentResolver = getContext().getContentResolver();
44 | }
45 |
46 | /**
47 | * Test that an app cannot access the /cache filesystem
48 | *
Tests Permission:
49 | * {@link android.Manifest.permission#ACCESS_CACHE_FILESYSTEM}
50 | */
51 | @MediumTest
52 | public void testAccessCacheFilesystem() throws IOException {
53 | try {
54 | String filePath = "/cache/this-should-not-exist.txt";
55 | FileOutputStream strm = new FileOutputStream(filePath);
56 | strm.write("Oops!".getBytes());
57 | strm.flush();
58 | strm.close();
59 | fail("Was able to create and write to " + filePath);
60 | } catch (SecurityException e) {
61 | // expected
62 | } catch (FileNotFoundException e) {
63 | // also could be expected
64 | }
65 | }
66 |
67 | /**
68 | * Test that an untrusted app cannot write to the download provider
69 | *
Tests Permission:
70 | * {@link com.android.providers.downloads.Manifest.permission#ACCESS_DOWNLOAD_MANAGER}
71 | * and
72 | * {@link android.Manifest.permission#INTERNET}
73 | */
74 | @MediumTest
75 | public void testWriteDownloadProvider() {
76 | try {
77 | ContentValues values = new ContentValues();
78 | values.put(Downloads.Impl.COLUMN_URI, "foo");
79 | mContentResolver.insert(Downloads.Impl.CONTENT_URI, values);
80 | fail("write to provider did not throw SecurityException as expected.");
81 | } catch (SecurityException e) {
82 | // expected
83 | }
84 | }
85 |
86 | /**
87 | * Test that an untrusted app cannot access the download service
88 | *
Tests Permission:
89 | * {@link com.android.providers.downloads.Manifest.permission#ACCESS_DOWNLOAD_MANAGER}
90 | */
91 | @MediumTest
92 | public void testStartDownloadService() {
93 | try {
94 | Intent downloadServiceIntent = new Intent();
95 | downloadServiceIntent.setClassName("com.android.providers.downloads",
96 | "com.android.providers.downloads.DownloadService");
97 | getContext().startService(downloadServiceIntent);
98 | fail("starting download service did not throw SecurityException as expected.");
99 | } catch (SecurityException e) {
100 | // expected
101 | }
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/res/values-zh-rCN/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "下载管理器"
20 | "访问下载管理器。"
21 | "允许应用程序访问下载管理器以及用它下载文件。恶意应用程序可借此干扰下载,以及访问隐私信息。"
22 | "高级下载管理器功能。"
23 | "允许应用程序使用下载管理器的高级功能。恶意应用程序可能会借此中断下载以及访问私密信息。"
24 | "发送下载通知。"
25 | "允许应用程序发送关于已完成下载的通知。恶意应用程序可借此干扰下载文件的其他应用程序。"
26 | "查看所有要存储至 USB 存储设备的下载项"
27 | "查看下载到 SD 卡的全部内容"
28 | "无论下载到 SD 卡的内容是由什么应用程序下载的,都允许该应用程序查看所有这些内容。"
29 | "保留下载缓存中的空间"
30 | "允许应用程序将文件下载到下载缓存(系统不会因为下载管理器需要更多空间而自动删除下载缓存)。"
31 | "直接下载文件而不显示通知"
32 | "允许应用程序在不向用户显示任何通知的情况下,通过下载管理器下载文件。"
33 | "访问所有系统下载内容"
34 | "允许该应用程序查看和修改由系统中的任意程序所发起的所有下载。"
35 | "<未命名>"
36 | ", "
37 | " 还有 %d 项"
38 | "下载完成"
39 | "下载失败"
40 | "此大小的文件需要通过 Wi-Fi 下载"
41 | "文件太大,不适于通过移动网络下载"
42 | "您不能从该移动网络下载一个大小为 %s 的文件。"\n\n"下次连接到 Wi-Fi 网络时,可触摸%s 下载此文件。"
43 | "加入 Wi-Fi 下载队列?"
44 | "从该移动网络下载这个大小为 %s 的文件可能会耗尽电池电量,还要向运营商支付额外的费用。"\n\n"下次连接到 Wi-Fi 网络时,可触摸%s下载此文件。"
45 | "排队"
46 | "取消"
47 | "立即开始"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-zh-rTW/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "下載管理員"
20 | "存取下載管理員。"
21 | "允許應用程式存取下載管理員,並使用它下載檔案。請注意:惡意程式可能使用此功能,影響下載並存取個人資料。"
22 | "下載管理員進階功能。"
23 | "允許應用程式存取下載管理員的進階功能 (惡意應用程式可能會利用此功能讓下載發生錯誤並存取私人資訊)。"
24 | "傳送下載通知。"
25 | "下載完成時,允許應用程式送出通知。請注意:惡意程式可能使用此功能干擾其他下載檔案的應用程式。"
26 | "查看所有下載到 USB 儲存裝置的內容"
27 | "查看 SD 卡中的所有下載項目"
28 | "允許應用程式查看 SD 卡中的所有下載項目,無論這些項目是透過何種應用程式進行下載。"
29 | "保留下載快取空間"
30 | "允許應用程式將檔案下載至下載快取空間,確保檔案不會因為下載管理員需要更多空間而遭到自動刪除。"
31 | "不顯示通知,直接下載檔案"
32 | "允許應用程式不需通知使用者,即可透過下載管理員下載檔案。"
33 | "存取所有系統下載內容"
34 | "可讓應用程式檢視與修改系統上任一應用程式所下載的所有內容。"
35 | "<未命名>"
36 | ", "
37 | " 以及其他 %d 個"
38 | "完成下載"
39 | "下載失敗"
40 | "這個檔案較大,需要 Wi-Fi 才能下載"
41 | "下載檔案過大,超過行動網路上限"
42 | "您無法透過這個行動網路下載 %s 的檔案。"\n\n"請輕觸 [%s ],即可在下次連上 Wi-Fi 網路時下載這個檔案。"
43 | "排入 Wi-Fi 下載佇列?"
44 | "透過這個行動網路下載這個 %s 的檔案可能會耗盡電池電量,而且行動通訊業者會額外收費。"\n\n"請輕觸 [%s],即可在下次連上 Wi-Fi 網路時下載這個檔案。"
45 | "佇列"
46 | "取消"
47 | "立即開始"
48 |
49 |
--------------------------------------------------------------------------------
/src/com/android/providers/downloads/RealSystemFacade.java:
--------------------------------------------------------------------------------
1 | package com.android.providers.downloads;
2 |
3 | import android.app.Notification;
4 | import android.app.NotificationManager;
5 | import android.content.Context;
6 | import android.content.Intent;
7 | import android.content.pm.PackageManager.NameNotFoundException;
8 | import android.net.ConnectivityManager;
9 | import android.net.NetworkInfo;
10 | import android.provider.Settings;
11 | import android.provider.Settings.SettingNotFoundException;
12 | import android.telephony.TelephonyManager;
13 | import android.util.Log;
14 |
15 | class RealSystemFacade implements SystemFacade {
16 | private Context mContext;
17 | private NotificationManager mNotificationManager;
18 |
19 | public RealSystemFacade(Context context) {
20 | mContext = context;
21 | mNotificationManager = (NotificationManager)
22 | mContext.getSystemService(Context.NOTIFICATION_SERVICE);
23 | }
24 |
25 | public long currentTimeMillis() {
26 | return System.currentTimeMillis();
27 | }
28 |
29 | public Integer getActiveNetworkType() {
30 | ConnectivityManager connectivity =
31 | (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
32 | if (connectivity == null) {
33 | Log.w(Constants.TAG, "couldn't get connectivity manager");
34 | return null;
35 | }
36 |
37 | NetworkInfo activeInfo = connectivity.getActiveNetworkInfo();
38 | if (activeInfo == null) {
39 | if (Constants.LOGVV) {
40 | Log.v(Constants.TAG, "network is not available");
41 | }
42 | return null;
43 | }
44 | return activeInfo.getType();
45 | }
46 |
47 | public boolean isNetworkRoaming() {
48 | ConnectivityManager connectivity =
49 | (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
50 | if (connectivity == null) {
51 | Log.w(Constants.TAG, "couldn't get connectivity manager");
52 | return false;
53 | }
54 |
55 | NetworkInfo info = connectivity.getActiveNetworkInfo();
56 | boolean isMobile = (info != null && info.getType() == ConnectivityManager.TYPE_MOBILE);
57 | boolean isRoaming = isMobile && TelephonyManager.getDefault().isNetworkRoaming();
58 | if (Constants.LOGVV && isRoaming) {
59 | Log.v(Constants.TAG, "network is roaming");
60 | }
61 | return isRoaming;
62 | }
63 |
64 | public Long getMaxBytesOverMobile() {
65 | try {
66 | return Settings.Secure.getLong(mContext.getContentResolver(),
67 | Settings.Secure.DOWNLOAD_MAX_BYTES_OVER_MOBILE);
68 | } catch (SettingNotFoundException exc) {
69 | return null;
70 | }
71 | }
72 |
73 | @Override
74 | public Long getRecommendedMaxBytesOverMobile() {
75 | try {
76 | return Settings.Secure.getLong(mContext.getContentResolver(),
77 | Settings.Secure.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE);
78 | } catch (SettingNotFoundException exc) {
79 | return null;
80 | }
81 | }
82 |
83 | @Override
84 | public void sendBroadcast(Intent intent) {
85 | mContext.sendBroadcast(intent);
86 | }
87 |
88 | @Override
89 | public boolean userOwnsPackage(int uid, String packageName) throws NameNotFoundException {
90 | return mContext.getPackageManager().getApplicationInfo(packageName, 0).uid == uid;
91 | }
92 |
93 | @Override
94 | public void postNotification(long id, Notification notification) {
95 | /**
96 | * TODO: The system notification manager takes ints, not longs, as IDs, but the download
97 | * manager uses IDs take straight from the database, which are longs. This will have to be
98 | * dealt with at some point.
99 | */
100 | mNotificationManager.notify((int) id, notification);
101 | }
102 |
103 | @Override
104 | public void cancelNotification(long id) {
105 | mNotificationManager.cancel((int) id);
106 | }
107 |
108 | @Override
109 | public void cancelAllNotifications() {
110 | mNotificationManager.cancelAll();
111 | }
112 |
113 | @Override
114 | public void startThread(Thread thread) {
115 | thread.start();
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/tests/src/tests/http/MockResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package tests.http;
18 |
19 | import static tests.http.MockWebServer.ASCII;
20 |
21 | import java.io.ByteArrayOutputStream;
22 | import java.io.IOException;
23 | import java.io.UnsupportedEncodingException;
24 | import java.util.ArrayList;
25 | import java.util.HashMap;
26 | import java.util.List;
27 | import java.util.Map;
28 |
29 | /**
30 | * A scripted response to be replayed by the mock web server.
31 | */
32 | public class MockResponse {
33 | private static final byte[] EMPTY_BODY = new byte[0];
34 |
35 | private String status = "HTTP/1.1 200 OK";
36 | private Map headers = new HashMap();
37 | private byte[] body = EMPTY_BODY;
38 | private boolean closeConnectionAfter = false;
39 |
40 | public MockResponse() {
41 | addHeader("Content-Length", 0);
42 | }
43 |
44 | /**
45 | * Returns the HTTP response line, such as "HTTP/1.1 200 OK".
46 | */
47 | public String getStatus() {
48 | return status;
49 | }
50 |
51 | public MockResponse setResponseCode(int code) {
52 | this.status = "HTTP/1.1 " + code + " OK";
53 | return this;
54 | }
55 |
56 | /**
57 | * Returns the HTTP headers, such as "Content-Length: 0".
58 | */
59 | public List getHeaders() {
60 | List headerStrings = new ArrayList();
61 | for (String header : headers.keySet()) {
62 | headerStrings.add(header + ": " + headers.get(header));
63 | }
64 | return headerStrings;
65 | }
66 |
67 | public MockResponse addHeader(String header, String value) {
68 | headers.put(header.toLowerCase(), value);
69 | return this;
70 | }
71 |
72 | public MockResponse addHeader(String header, long value) {
73 | return addHeader(header, Long.toString(value));
74 | }
75 |
76 | public MockResponse removeHeader(String header) {
77 | headers.remove(header.toLowerCase());
78 | return this;
79 | }
80 |
81 | /**
82 | * Returns an input stream containing the raw HTTP payload.
83 | */
84 | public byte[] getBody() {
85 | return body;
86 | }
87 |
88 | public MockResponse setBody(byte[] body) {
89 | addHeader("Content-Length", body.length);
90 | this.body = body;
91 | return this;
92 | }
93 |
94 | public MockResponse setBody(String body) {
95 | try {
96 | return setBody(body.getBytes(ASCII));
97 | } catch (UnsupportedEncodingException e) {
98 | throw new AssertionError();
99 | }
100 | }
101 |
102 | public MockResponse setChunkedBody(byte[] body, int maxChunkSize) throws IOException {
103 | addHeader("Transfer-encoding", "chunked");
104 |
105 | ByteArrayOutputStream bytesOut = new ByteArrayOutputStream();
106 | int pos = 0;
107 | while (pos < body.length) {
108 | int chunkSize = Math.min(body.length - pos, maxChunkSize);
109 | bytesOut.write(Integer.toHexString(chunkSize).getBytes(ASCII));
110 | bytesOut.write("\r\n".getBytes(ASCII));
111 | bytesOut.write(body, pos, chunkSize);
112 | bytesOut.write("\r\n".getBytes(ASCII));
113 | pos += chunkSize;
114 | }
115 | bytesOut.write("0\r\n".getBytes(ASCII));
116 | this.body = bytesOut.toByteArray();
117 | return this;
118 | }
119 |
120 | public MockResponse setChunkedBody(String body, int maxChunkSize) throws IOException {
121 | return setChunkedBody(body.getBytes(ASCII), maxChunkSize);
122 | }
123 |
124 | @Override public String toString() {
125 | return status;
126 | }
127 |
128 | public boolean shouldCloseConnectionAfter() {
129 | return closeConnectionAfter;
130 | }
131 |
132 | public MockResponse setCloseConnectionAfter(boolean closeConnectionAfter) {
133 | this.closeConnectionAfter = closeConnectionAfter;
134 | return this;
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "ダウンロードマネージャー"
20 | "ダウンロードマネージャーにアクセスします。"
21 | "ダウンロードマネージャーにアクセスしてファイルをダウンロードすることをアプリケーションに許可します。悪意のあるアプリケーションがこれを利用して、ダウンロードに深刻な影響を与えたり、個人データにアクセスしたりする恐れがあり。"
22 | "ダウンロードマネージャーの高度な機能です。"
23 | "ダウンロードマネージャーの高度な機能にアプリケーションからアクセスできるようにします。これにより、悪意のあるアプリケーションがダウンロードに深刻な影響を与えたり個人情報にアクセスしたりできるようになります。"
24 | "ダウンロード通知を送信します。"
25 | "ダウンロード完了の通知の送信をアプリケーションに許可します。悪意のあるアプリケーションがファイルをダウンロードする他のアプリケーションの処理を妨害する恐れがあります。"
26 | "USBストレージへの全ダウンロードを見る"
27 | "SDカードへのダウンロードをすべて参照する"
28 | "どのアプリケーションでダウンロードされたかにかかわらず、SDカードにダウンロードされたすべてのファイルの参照をアプリケーションに許可します。"
29 | "ダウンロードキャッシュの領域を予約"
30 | "ダウンロードマネージャーで領域が不足しているときに、自動的に削除できないダウンロードキャッシュへのファイルのダウンロードをアプリケーションに許可します。"
31 | "通知なしでファイルをダウンロードする"
32 | "ユーザー通知なしでのダウンロードマネージャー経由のファイルのダウンロードをアプリケーションに許可します。"
33 | "すべてのシステムダウンロードにアクセス"
34 | "システム上のアプリケーションによるすべてのダウンロードの表示と変更をアプリケーションに許可します。"
35 | "<無題>"
36 | "、 "
37 | " その他%d件"
38 | "ダウンロード完了"
39 | "ダウンロードに失敗しました"
40 | "Wi-Fiが必要なサイズです"
41 | "ダウンロードするサイズが大きすぎます"
42 | "このモバイルネットワークでは%s のファイルをダウンロードできません。"\n\n"%s をタップすると次にWi-Fiネットワークに繋がったときにダウンロードされます。"
43 | "Wi-Fiでのダウンロードをキューに登録しますか?"
44 | "このネットワークで%s をダウンロードすると、電池を消耗し携帯通信会社から追加料金を請求される場合があります。"\n\n"%sをタップすると次にWi-Fiネットワークに繋がったときにダウンロードされます。"
45 | "キューに登録"
46 | "キャンセル"
47 | "今すぐ開始"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-ko/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "다운로드 관리자"
20 | "다운로드 관리자에 액세스합니다."
21 | "애플리케이션이 다운로드 관리자에 액세스하여 파일을 다운로드하도록 허용합니다. 이 경우 악성 애플리케이션이 다운로드를 중단시키고 비공개 정보에 액세스할 수 있습니다."
22 | "고급 다운로드 관리자 기능입니다."
23 | "애플리케이션이 다운로드 관리자의 고급 기능에 액세스할 수 있도록 허용합니다. 이 경우 악성 애플리케이션이 다운로드를 중단시키고 개인 정보에 액세스할 수 있습니다."
24 | "다운로드 알림을 전송합니다."
25 | "애플리케이션이 완료된 다운로드에 대한 알림을 보낼 수 있도록 허용합니다. 이 경우 악성 애플리케이션이 파일을 다운로드하는 다른 애플리케이션에 혼란을 야기할 할 수 있습니다."
26 | "USB 저장소에 다운로드한 전체 항목 보기"
27 | "SD 카드에 다운로드한 모든 항목 보기"
28 | "어떤 애플리케이션을 사용하여 다운로드했는지에 관계없이 SD 카드에 다운로드한 모든 항목을 애플리케이션에 표시합니다."
29 | "다운로드 캐시에 공간 보유"
30 | "다운로드 관리자가 추가 공간이 필요한 경우 애플리케이션이 자동으로 삭제되지 않는 다운로드 캐시에 파일을 다운로드하도록 허용합니다."
31 | "알림 없이 파일 다운로드"
32 | "사용자에게 알림을 표시하지 않고 애플리케이션이 다운로드 관리자를 통해 파일을 다운로드하도록 허용합니다."
33 | "모든 시스템 다운로드에 액세스"
34 | "애플리케이션이 시스템의 모든 애플리케이션에서 시작된 다운로드를 모두 보고 수정할 수 있도록 합니다."
35 | "<제목 없음>"
36 | ", "
37 | " 외 %d개"
38 | "다운로드 완료"
39 | "다운로드 실패"
40 | "너무 커서 Wi-Fi로 다운로드해야 합니다."
41 | "너무 커서 모바일 네트워크로 다운로드할 수 없습니다."
42 | "사용하시는 모바일 네트워크에서 %s 크기의 파일을 다운로드할 수 없습니다."\n\n"이 파일을 다운로드하려면 다음에 Wi-Fi 네트워크에 연결될 때 %s 을(를) 터치하세요."
43 | "Wi-Fi 다운로드용으로 대기할까요?"
44 | "사용하시는 모바일 네트워크에서 %s 크기의 파일을 다운로드하면 배터리가 많이 소모되고 이동통신사로부터 추가 요금이 발생할 수 있습니다."\n\n"이 파일을 다운로드하려면 다음에 Wi-Fi 네트워크에 연결될 때 %s을(를) 터치하세요."
45 | "대기열"
46 | "취소"
47 | "지금 시작"
48 |
49 |
--------------------------------------------------------------------------------
/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
11 |
12 |
13 |
17 |
18 |
19 |
23 |
24 |
25 |
29 |
30 |
31 |
36 |
37 |
40 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
58 |
61 |
63 |
65 |
66 |
68 |
70 |
71 |
72 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/res/layout/status_bar_ongoing_event_progress_bar.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
26 |
27 |
32 |
33 |
41 |
48 |
55 |
56 |
57 |
64 |
73 |
80 |
87 |
88 |
89 |
97 |
106 |
107 |
108 |
109 |
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/res/values-nb/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Nedlaster"
20 | "Få tilgang til nedlasteren."
21 | "Gir applikasjonen tilgang til nedlasteren, og å bruke den til å laste ned filer. Ondsinnede applikasjoner kan bruke dette til å forstyrre nedlastinger og få tilgang til privat informasjon."
22 | "Avansert nedlastingsfunksjonalitet."
23 | "Gir programmet tilgang til avanserte funksjoner i nedlastingsprogrammene. Skadelige programmer kan bruke dette til å forstyrre nedlastninger og gi tilgang til privat informasjon."
24 | "Sende nedlastingsvarslinger"
25 | "Lar applikasjonen sende varslinger om ferdige nedlastinger. Ondsinnede applikasjoner kan bruke dette for å forvirre andre applikasjoner som laster ned filer."
26 | "Vis nedl. til USB-lagring"
27 | "Vis alle nedlastinger til minnekort"
28 | "Programmet viser alle nedlastinger til minnekort, uavhengig av hvilket program som lastet dem ned."
29 | "Reserver lagringsplass i nedlastingsbufferen"
30 | "Gir programmet mulighet til å laste ned filer til nedlastingsbufferen, slik at de ikke slettes automatisk når nedlastingsbehandlingen trenger mer lagringsplass."
31 | "last ned filer uten varsling"
32 | "Gjør at programmet kan laste ned filer via nedlastingsbehandlingen, uten at brukeren varsles."
33 | "Tilgang til alle systemnedlastinger"
34 | "Tillater programmet å vise og endre prosesser igangsatt av andre programmer i systemet."
35 | "<Uten navn>"
36 | ", "
37 | " og %d til"
38 | "Ferdig nedlasting"
39 | "Mislykket nedlasting"
40 | "Str. krever Wi-Fi"
41 | "Nedlastingen for stor for mobilnettverket"
42 | "Du kan ikke laste ned en %s -fil på dette mobilnettverket. "\n\n"Trykk på %s for å laste ned denne filen ved neste tilkobling til et Wi-Fi-nettverk."
43 | "Vil du sette nedlastingen i kø for Wi-Fi-nedl.?"
44 | "Nedlasting av %s -filen på dette mobilnettverket kan gi økt batteribruk og ekstrakostnader fra operatør."\n\n"Trykk på %s for å laste ned filen ved neste tilkobling til et Wi-Fi-nettverk."
45 | "Kø"
46 | "Avbryt"
47 | "Start nå"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-sv/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Hämtningshanterare"
20 | "Åtkomst till hämtningshanterare."
21 | "Tillåter att ett program får åtkomst till hämtningshanteraren och hämtar filer med den. Skadliga program kan använda detta för att störa hämtningar och komma åt privat information."
22 | "Avancerade funktioner för hämtningshanterare."
23 | "Tillåter att ett program får åtkomst till hämtningshanterarens avancerade funktioner. Skadliga program kan använda detta för att störa hämtningar och komma åt privat information."
24 | "Skicka meddelande om hämtning."
25 | "Tillåter att ett program skickar meddelanden om slutförda hämtningar. Skadliga program kan använda detta för att störa andra program som hämtar filer."
26 | "Visa hämtningar till USB"
27 | "Visa alla hämtningar till SD-kort"
28 | "Tillåter att programmet ser alla hämtningar till SD-kortet, oavsett vilket program som hämtat innehållet."
29 | "Reservera utrymme i hämtningscachen"
30 | "Tillåter att programmet hämtar filer till hämtningscachen som inte kan tas bort automatiskt när hämtningshanteraren behöver mer utrymme."
31 | "hämta filer utan avisering"
32 | "Tillåter att programmet hämtar filer via hämtningshanteraren utan att någon avisering visas för användaren."
33 | "Åtkomst till alla hämtade filer i systemet"
34 | "Tillåt att programmet visar och ändrar allt som initieras av något program i systemet."
35 | "<Okänd>"
36 | ", "
37 | " och %d till"
38 | "Hämtning slutförd"
39 | "Det gick inte att hämta"
40 | "Hämtningen kräver Wi-Fi"
41 | "Hämtningen är för stor för det mobila nätverket"
42 | "Det går inte att hämta en %s -fil i det här mobila nätverket."\n\n"Tryck på %s om du vill hämta filen nästa gång du är ansluten till ett Wi-Fi-nätverk."
43 | "Vill du ställa den i kö för Wi-Fi-hämtning?"
44 | "Om du hämtar den här %s -filen i mobilnätet kan batteriet ta slut och du kan dra på dig extra avgifter."\n\n"Tryck på %s om du vill hämta filen nästa gång du är ansluten till Wi-Fi."
45 | "Kö"
46 | "Avbryt"
47 | "Starta nu"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-cs/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Správce stahování"
20 | "Získat přístup ke správci stahování."
21 | "Umožní aplikaci získat přístup ke správci stahování a stahovat pomocí něj soubory. Škodlivé aplikace mohou pomocí tohoto nastavení narušit stahování a získat přístup k soukromým informacím."
22 | "Pokročilé funkce správce stahování."
23 | "Umožňuje aplikaci přístup k pokročilým funkcím správce stahování. Škodlivé aplikace toho mohou využít a narušit stahování nebo získat přístup k důvěrným informacím."
24 | "Odeslat oznámení o stahování."
25 | "Umožní aplikaci odeslat oznámení o dokončení stahování. Škodlivé aplikace mohou pomocí tohoto nastavení zmást jiné aplikace, které stahují soubory."
26 | "Zobrazit stahování – USB"
27 | "Zobrazení všech položek stažených na kartu SD"
28 | "Umožňuje aplikaci zobrazit všechny položky stažené na kartu SD bez ohledu na to, která aplikace je stáhla."
29 | "Rezervovat místo v mezipaměti stahování"
30 | "Umožňuje aplikaci stáhnout soubory do mezipaměti stahování, kterou nelze automaticky smazat, pokud správce stahování potřebuje více místa."
31 | "stahovat soubory bez upozornění"
32 | "Umožňuje aplikaci stahovat soubory prostřednictvím správce stahování, aniž by se zobrazilo upozornění uživateli ."
33 | "Přístup ke všem systémovým stahováním"
34 | "Umožní aplikaci zobrazit a upravovat všechen obsah spuštěný jakoukoli aplikací v systému."
35 | "<Bez názvu>"
36 | ", "
37 | " a ještě %d"
38 | "Stahování bylo dokončeno"
39 | "Stažení se nezdařilo."
40 | "Vyžaduje WiFi (velikost)"
41 | "Stahovaný soubor je pro mobilní síť příliš velký"
42 | "V této mobilní síti nelze stáhnout soubor o velikosti %s ."\n\n"Dotkněte se fronty %s a soubor bude stažen při příštím připojení k síti Wi-Fi."
43 | "Zařadit do fronty ke stažení v síti Wi-Fi?"
44 | "Stažením tohoto souboru o velikosti %s v této mobilní síti riskujete vybití baterie a dodatečné poplatky."\n\n"Dotkněte se fronty %s a soubor se stáhne při příštím připojení k síti Wi-Fi."
45 | "Fronta"
46 | "Zrušit"
47 | "Spustit"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Диспетчер загрузки"
20 | "Доступ к менеджеру загрузки."
21 | "Предоставляет приложению доступ к менеджеру загрузки и позволяет использовать его для загрузки файлов. Вредоносное ПО может пользоваться этим для прерывания загрузок и доступа к личной информации."
22 | "Расширенные функции менеджера загрузки."
23 | "Предоставляет приложению доступ к расширенным функциям диспетчера загрузки. Вредоносное ПО может этим воспользоваться для прерывания загрузки и доступа к личной информации."
24 | "Отправить оповещение о загрузке."
25 | "Позволяет приложению отправлять оповещения о завершенных загрузках. Вредоносное ПО может пользоваться этим, мешая работе приложений, загружающих файлы."
26 | "Отслеживать все загрузки на общий накопитель"
27 | "Просмотреть все загрузки на SD-карту"
28 | "Разрешить программе доступ ко всем загрузкам на SD-карту независимо от того, через какое приложение они были загружены."
29 | "Резервировать место в кэше загрузки"
30 | "Разрешает приложению загружать файлы в кэш загрузки (который не может быть автоматически очищен), если менеджеру загрузки потребуется больше места."
31 | "загружать файлы без оповещения"
32 | "Разрешает приложению загружать файлы через диспетчер загрузки без уведомления пользователя."
33 | "Доступ ко всем загрузкам"
34 | "Позволяет приложению считывать и изменять все загрузки, запущенные любым приложением в системе."
35 | "<без названия>"
36 | ", "
37 | " и ещё %d"
38 | "Загрузка завершена"
39 | "Ошибка загрузки"
40 | "Размер файла требует Wi-Fi"
41 | "Слишком большой файл для мобильной сети"
42 | "Вы не можете загрузить файл (%s ) в этой мобильной сети."\n\n"Нажмите %s , чтобы загрузить этот файл при следующем подключении к сети Wi-Fi."
43 | "Добавить загрузку в очередь Wi-Fi?"
44 | "Загрузка файла (%s ) в этой мобильной сети может привести к разрядке батареи и дополнительным расходам."\n\n"Нажмите %s, чтобы загрузить этот файл при следующем подключении к сети Wi-Fi."
45 | "Добавить в очередь"
46 | "Отмена"
47 | "Запустить"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-da/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Downloadadministrator"
20 | "Få adgang til downloadadministrator."
21 | "Tillader, at programmet får adgang til downloadadministratoren og bruger det til at få adgang til downloadede filer. Ondsindede programmer kan bruge det til at afbryde downloads og få adgang til personlige oplysninger."
22 | "Avancerede funktioner for downloadadministrator."
23 | "Tillader, at programmet får adgang til de avancerede funktioner i downloadadministratoren. Ondsindede programmer kan bruge dette til at afbryde downloads og få adgang til personlige oplysninger."
24 | "Send downloadmeddelelser."
25 | "Tillader, at programmet sender meddelelser om afsluttede downloads. Ondsindede programmer kan bruge dette til at forvirre andre programmer, der downloader filer."
26 | "Se alle downloads til USB-lagr."
27 | "Se alle downloads til SD-kort"
28 | "Gør det muligt for programmet at se alle downloads til SD-kortet, uanset hvilket program, der downloadede dem."
29 | "Reserver plads i downloadcache"
30 | "Programmet kan downloade filer til downloadcachen, som ikke automatisk kan slettes, når downloadmanageren har brug for mere plads."
31 | "download filer uden meddelelse"
32 | "Tillader, at programmet kan downloade filer via downloadmanageren, uden at brugeren underrettes."
33 | "Adgang til alle systemdownloads"
34 | "Giver programmet tilladelse til at få vist og ændre alt, der igangsættes af et andet program i systemet."
35 | "<Uden titel>"
36 | ", "
37 | " og %d mere"
38 | "Download afsluttet"
39 | "Download mislykkedes"
40 | "Download kræver Wi-Fi"
41 | "Downloadfilen er for stor til mobilnetværk"
42 | "Du kan ikke downloade en fil på %s på dette mobilnetværk."\n\n"Tryk på %s for at downloade denne fil, næste gang der er forbindelse via Wi-Fi."
43 | "I kø til Wi-Fi-download?"
44 | "Hvis du downloader en fil på %s på dette mobilnetværk, vil det dræne dit batteri."\n\n"Tryk på %s for at downloade denne fil, næste gang der er forbindelse via Wi-Fi."
45 | "Kø"
46 | "Annuller"
47 | "Begynd nu"
48 |
49 |
--------------------------------------------------------------------------------
/src/com/android/providers/downloads/SizeLimitActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.providers.downloads;
18 |
19 | import android.app.Activity;
20 | import android.app.AlertDialog;
21 | import android.app.Dialog;
22 | import android.content.ContentValues;
23 | import android.content.DialogInterface;
24 | import android.content.Intent;
25 | import android.database.Cursor;
26 | import android.net.Uri;
27 | import android.provider.Downloads;
28 | import android.text.format.Formatter;
29 | import android.util.Log;
30 |
31 | import java.util.LinkedList;
32 | import java.util.Queue;
33 |
34 | /**
35 | * Activity to show dialogs to the user when a download exceeds a limit on download sizes for
36 | * mobile networks. This activity gets started by the background download service when a download's
37 | * size is discovered to be exceeded one of these thresholds.
38 | */
39 | public class SizeLimitActivity extends Activity
40 | implements DialogInterface.OnCancelListener, DialogInterface.OnClickListener {
41 | private Dialog mDialog;
42 | private Queue mDownloadsToShow = new LinkedList();
43 | private Uri mCurrentUri;
44 | private Intent mCurrentIntent;
45 |
46 | @Override
47 | protected void onNewIntent(Intent intent) {
48 | super.onNewIntent(intent);
49 | setIntent(intent);
50 | }
51 |
52 | @Override
53 | protected void onResume() {
54 | super.onResume();
55 | Intent intent = getIntent();
56 | if (intent != null) {
57 | mDownloadsToShow.add(intent);
58 | setIntent(null);
59 | showNextDialog();
60 | }
61 | if (mDialog != null && !mDialog.isShowing()) {
62 | mDialog.show();
63 | }
64 | }
65 |
66 | private void showNextDialog() {
67 | if (mDialog != null) {
68 | return;
69 | }
70 |
71 | if (mDownloadsToShow.isEmpty()) {
72 | finish();
73 | return;
74 | }
75 |
76 | mCurrentIntent = mDownloadsToShow.poll();
77 | mCurrentUri = mCurrentIntent.getData();
78 | Cursor cursor = getContentResolver().query(mCurrentUri, null, null, null, null);
79 | try {
80 | if (!cursor.moveToFirst()) {
81 | Log.e(Constants.TAG, "Empty cursor for URI " + mCurrentUri);
82 | dialogClosed();
83 | return;
84 | }
85 | showDialog(cursor);
86 | } finally {
87 | cursor.close();
88 | }
89 | }
90 |
91 | private void showDialog(Cursor cursor) {
92 | int size = cursor.getInt(cursor.getColumnIndexOrThrow(Downloads.Impl.COLUMN_TOTAL_BYTES));
93 | String sizeString = Formatter.formatFileSize(this, size);
94 | String queueText = getString(R.string.button_queue_for_wifi);
95 | boolean isWifiRequired =
96 | mCurrentIntent.getExtras().getBoolean(DownloadInfo.EXTRA_IS_WIFI_REQUIRED);
97 |
98 | AlertDialog.Builder builder = new AlertDialog.Builder(this);
99 | if (isWifiRequired) {
100 | builder.setTitle(R.string.wifi_required_title)
101 | .setMessage(getString(R.string.wifi_required_body, sizeString, queueText))
102 | .setPositiveButton(R.string.button_queue_for_wifi, this)
103 | .setNegativeButton(R.string.button_cancel_download, this);
104 | } else {
105 | builder.setTitle(R.string.wifi_recommended_title)
106 | .setMessage(getString(R.string.wifi_recommended_body, sizeString, queueText))
107 | .setPositiveButton(R.string.button_start_now, this)
108 | .setNegativeButton(R.string.button_queue_for_wifi, this);
109 | }
110 | mDialog = builder.setOnCancelListener(this).show();
111 | }
112 |
113 | @Override
114 | public void onCancel(DialogInterface dialog) {
115 | dialogClosed();
116 | }
117 |
118 | private void dialogClosed() {
119 | mDialog = null;
120 | mCurrentUri = null;
121 | showNextDialog();
122 | }
123 |
124 | @Override
125 | public void onClick(DialogInterface dialog, int which) {
126 | boolean isRequired =
127 | mCurrentIntent.getExtras().getBoolean(DownloadInfo.EXTRA_IS_WIFI_REQUIRED);
128 | if (isRequired && which == AlertDialog.BUTTON_NEGATIVE) {
129 | getContentResolver().delete(mCurrentUri, null, null);
130 | } else if (!isRequired && which == AlertDialog.BUTTON_POSITIVE) {
131 | ContentValues values = new ContentValues();
132 | values.put(Downloads.Impl.COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT, true);
133 | getContentResolver().update(mCurrentUri, values , null, null);
134 | }
135 | dialogClosed();
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/res/values-tr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "İndirme Yöneticisi"
20 | "İndirme yöneticisine erişin."
21 | "Uygulamaya indirme yöneticisine erişme ve bunu dosyaları indirmek için kullanma izni verir. Kötü amaçlı uygulamalar bunu indirme işlemlerini bozmak ve özel bilgilere erişmek için kullanabilir."
22 | "Gelişmiş indirme yöneticisi işlevleri."
23 | "Uygulamaya indirme yöneticisinin gelişmiş işlevlerine erişme izni verir. Kötü niyetli uygulamalar, indirme işlemlerini bozmak ve özel bilgilere erişmek için bunu kullanabilir."
24 | "İndirme bildirimleri gönder."
25 | "Uygulamaya tamamlanan indirme işlemleri ile ilgili bildirimler gönderme izni verir. Kötü amaçlı uygulamalar bunu dosya indiren diğer uygulamaları yanıltmak için kullanabilir."
26 | "USB dp brmne yapln tüm indr göst"
27 | "SD karta yapılan tüm indirmeleri gör"
28 | "Uygulamanın SD karta yapılan tüm indirmeleri, indirme işlemini yapan uygulamadan bağımsız olarak görmesine izin verir."
29 | "İndirme önbelleğinde alan ayır"
30 | "Uygulamanın dosyaları, indirme önbelleğine indirmesine izin verir. İndirme önbelleği indirme yöneticisi daha fazla alana ihtiyaç duyduğunda otomatik olarak silinemez."
31 | "dosyaları bildirimde bulunmadan indir"
32 | "Uygulamanın dosyaları, kullanıcıya herhangi bir bildirim göstermeden indirme yöneticisi ile indirmesine izin verir."
33 | "Tüm sistem indirmelerine erişim"
34 | "Uygulamanın, sistemdeki herhangi bir uygulama tarafından başlatılan tüm işlemleri görüntülemesine ve değiştirmesine olanak tanır."
35 | "<Adsız>"
36 | ", "
37 | " ve %d adet daha"
38 | "İndirme işlemi tamamlandı"
39 | "İndirme işlemi başarısız"
40 | "İndr boyutu Kablsz bağ gerkt"
41 | "İndirme boyutu mobil ağ için çok büyük"
42 | "Bu mobil ağda %s boyutunda bir dosyayı indiremezsiniz."\n\n"Bu dosyayı, Kablosuz ağa yeniden bağlandığınızda indirmek için %s simgesine dokunun."
43 | "Kablosuz indirme için kuyruğa alınsın mı?"
44 | "Bu mobil ağda %s boyutlu bu dosyanın indirilmesi pilin bitmesine ve operatörünüzün ek ücret almasına yol açabilir."\n\n"Bu dosyayı, Kablosuz ağa yeniden bağl. indirmek için %s simg. dokunun."
45 | "Kuyruğa al"
46 | "İptal"
47 | "Şimdi başlat"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Administrador de descargas"
20 | "Acceso al administrador de descargas"
21 | "Permite que la aplicación acceda al administrador de descargas y lo utilice para descargar archivos. Las aplicaciones malintencionadas pueden utilizar este permiso para provocar daños en las descargas y acceder a información privada."
22 | "Funciones avanzadas del administrador de descargas"
23 | "Permite que la aplicación acceda a las funciones avanzadas del administrador de descargas. Las aplicaciones malintencionadas pueden utilizar este permiso para provocar daños en las descargas y acceder a información privada."
24 | "Envío de notificaciones de descarga"
25 | "Permite que la aplicación envíe notificaciones sobre descargas completadas. Las aplicaciones malintencionadas pueden utilizar este permiso para confundir a otras aplicaciones que descarguen archivos."
26 | "Ver descargas en USB"
27 | "Ver todas las descargas en tarjeta SD"
28 | "Permite que la aplicación vea todas las descargas en la tarjeta SD, independientemente de la aplicación que las haya descargado."
29 | "Reservar espacio en caché de descargas"
30 | "Permite que la aplicación descargue archivos en la caché de descargas que no se pueden eliminar de forma automática cuando falta espacio en el administrador de descargas."
31 | "descargar archivos sin notificación"
32 | "Permite que la aplicación descargue archivos a través del administrador de descargas sin mostrar notificación al usuario."
33 | "Acceso a todas las descargas del sistema"
34 | "Permite que la aplicación vea y modifique todas las acciones iniciadas por cualquier aplicación del sistema."
35 | "<Sin título>"
36 | ", "
37 | " y %d más"
38 | "Descarga completada"
39 | "Descarga incorrecta"
40 | "Tamaño descarga requiere WiFi"
41 | "Descarga demasiado grande para red móvil"
42 | "Para completar esta descarga de %s , necesitas una conexión Wi-Fi. "\n\n"Haz clic en %s para iniciar la descarga la próxima vez que te conectes a una red Wi-Fi."
43 | "¿Poner en cola para descargar en red WiFi?"
44 | "Si descargas %s la batería puede durar menos o tu operador te puede cobrar por un exceso de datos."\n\n" Haz clic en %s para descargar al conectarte a la red Wi-Fi."
45 | "Poner en cola"
46 | "Cancelar"
47 | "Empezar ahora"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-pt/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Gerenciador de downloads"
20 | "Acessar o gerenciador de download."
21 | "Permite que o aplicativo acesse o gerenciador de download e use-o para fazer o download de arquivos. Aplicativos maliciosos podem usar isso para interromper os downloads e acessar informações particulares."
22 | "Funções avançadas do gerenciador de download."
23 | "Permite que o aplicativo acesse as funções avançadas do gerenciador de downloads. Aplicativos maliciosos podem usar isso para interromper os downloads e acessar informações particulares."
24 | "Enviar notificações de download."
25 | "Permite que o aplicativo envie notificações sobre downloads concluídos. Aplicativos maliciosos podem usar isso para confundir outros aplicativos que fazem download de arquivos."
26 | "Ver downloads armaz. USB"
27 | "Ver todos os downloads para o cartão SD"
28 | "Permite que o aplicativo veja todos os downloads feitos no cartão SD, independentemente do aplicativo que fez o download."
29 | "Reservar espaço no cache de download"
30 | "Permite que o aplicativo faça download de arquivos no cache de downloads, que não pode ser excluído automaticamente quando o gerenciador precisa de mais espaço."
31 | "fazer download de arquivos sem notificação"
32 | "Permite que o aplicativo faça download de arquivos por meio do gerenciador de download sem exibir notificações ao usuário."
33 | "Acessar todos os downloads do sistema"
34 | "Permite que o aplicativo visualize e modifique todos os processos iniciados por qualquer aplicativo no sistema."
35 | "<Sem título>"
36 | ", "
37 | " e %d mais"
38 | "Download concluído"
39 | "Falha no download"
40 | "O tamanho requer Wi-Fi"
41 | "Download muito grande para a rede móvel"
42 | "Não é possível fazer o download de um arquivo %s nesta rede móvel."\n\n"Toque em %s para fazer o download deste arquivo na próxima vez que se conectar a uma rede Wi-Fi."
43 | "Colocar em fila para download da rede Wi-Fi?"
44 | "O download do arquivo %s nesta rede móvel pode consumir a bateria e causar cobranças da operadora."\n\n"Toque em %s para download do arquivo na próxima vez que se conectar a uma rede Wi-Fi."
45 | "Fila"
46 | "Cancelar"
47 | "Iniciar agora"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-es-rUS/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Administrador de carga"
20 | "Accede al administrador de descarga."
21 | "Permite a la aplicación acceder al administrador de descarga y utilizarlo para descargar archivos. Las aplicaciones maliciosas pueden utilizarlo para interrumpir las descargas y acceder a información privada."
22 | "Funciones avanzadas del administrador de descarga"
23 | "Permite a la aplicación acceder a las funciones avanzadas del administrador de descarga. Las aplicaciones maliciosas pueden utilizarlo para interrumpir las descargas y acceder a información privada."
24 | "Enviar notificaciones de descarga."
25 | "Permite a la aplicación enviar notificaciones acerca de las descargas completadas. Las aplicaciones maliciosas pueden utilizarlo para confundir a otras aplicaciones que descargan archivos."
26 | "Ver todas las descargas almacenadas en USB"
27 | "Ver todas las descargas de la tarjeta SD"
28 | "Permite que la aplicación vea todas las descargas de la tarjeta SD, independientemente de qué aplicación las descargó."
29 | "Reservar espacio en el caché de descarga"
30 | "Permite que la aplicación descargue archivos al caché de descarga que no puede borrarse automáticamente cuando el administrador de descarga necesita más espacio."
31 | "descargar archivos sin notificación"
32 | "Permite que la aplicación descargue archivos a través del administrador de descarga sin que se muestre una notificación al usuario."
33 | "Acceder a todos los sistemas de descarga"
34 | "Permite que la aplicación acceda y modifique todo lo iniciado por cualquier aplicación del sistema."
35 | "<Sin título>"
36 | ", "
37 | " y %d más"
38 | "Descarga completa"
39 | "La descarga no se ha realizado correctamente"
40 | "El tamaño de la descarga requiere Wi-Fi."
41 | "Descarga demasiado grande para una red móvil"
42 | "Debes usar WiFi para completar esta %s descarga. "\n\n"Haz clic en %s para iniciar esta descarga la próxima vez que te conectes a una red de WiFi."
43 | "¿Poner en una fila de archivos para descargar más tarde?"
44 | "Iniciar esta %s descarga ahora puede acortar la vida útil de la batería u ocasionar un uso excesivo de la conexión de datos móviles. Esto, a su vez, puede producir cargos de tu operador móvil dependiendo de tu plan de datos."\n\n" Haz clic %s a continuación para comenzar esta descarga la próxima vez que te conectes a una red de WiFi."
45 | "Cola"
46 | "Cancelar"
47 | "Comenzar ahora"
48 |
49 |
--------------------------------------------------------------------------------
/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 | "Menedżer pobierania"
20 | "Dostęp do menedżera pobierania."
21 | "Umożliwia programowi dostęp do menedżera pobierania i pobieranie plików przy jego użyciu. Szkodliwe programy mogą w ten sposób zakłócić pobieranie i uzyskać dostęp do prywatnych informacji."
22 | "Zaawansowane funkcje menedżera pobierania."
23 | "Zezwala aplikacji na uzyskiwanie dostępu do zaawansowanych funkcji menedżera pobierania. Złośliwe aplikacje mogą wykorzystać tę możliwość w celu zakłócenia pobierania i uzyskania dostępu do informacji prywatnych."
24 | "Wysyłanie powiadomień o pobraniu."
25 | "Umożliwia programowi wysyłanie powiadomień o ukończeniu pobierania. Szkodliwe programy mogą korzystać z tego uprawnienia, aby zakłócić działanie innych programów pobierających pliki."
26 | "Zobacz pliki pobrane na USB"
27 | "Sprawdzanie wszystkich plików pobranych na kartę SD"
28 | "Zezwala aplikacji na sprawdzanie wszystkich plików pobranych na kartę SD niezależnie od tego, która aplikacja je pobrała."
29 | "Zarezerwuj miejsce w pamięci podręcznej pobierania"
30 | "Zezwala aplikacji na pobieranie plików do pamięci podręcznej, której nie można automatycznie usunąć, gdy menedżer pobierania wymaga więcej miejsca."
31 | "pobieraj pliki bez powiadomienia"
32 | "Zezwala aplikacji na pobieranie plików za pomocą menedżera pobierania bez wyświetlania powiadomienia."
33 | "Dostęp do wszystkich pobranych pozycji w systemie"
34 | "Umożliwia aplikacji wyświetlanie i modyfikowanie wszystkich pobierań przez każdą aplikację w systemie."
35 | "<Bez nazwy>"
36 | ", "
37 | " i inne (%d)"
38 | "Pobieranie zakończone."
39 | "Pobieranie nie powiodło się"
40 | "Rozmiar pobierania wymaga Wi-Fi"
41 | "Zbyt duży plik w przypadku sieci komórkowej"
42 | "W tej sieci komórkowej nie możesz pobrać pliku o wielkości %s ."\n\n"Dotknij przycisku %s , aby pobrać ten plik po nawiązaniu połączenia z siecią Wi-Fi."
43 | "Dodać do kolejki pobierania przez sieć Wi-Fi?"
44 | "Pobranie pliku o wielkości %s w sieci komórkowej grozi rozładowaniem baterii i naliczeniem dodatkowych opłat przez operatora."\n\n"Dotknij %s, aby pobrać plik po nawiązaniu połączenia Wi-Fi."
45 | "Dodaj do kolejki"
46 | "Anuluj"
47 | "Rozpocznij teraz"
48 |
49 |
--------------------------------------------------------------------------------