summaryrefslogtreecommitdiff
path: root/packages/MtpDocumentsProvider
diff options
context:
space:
mode:
Diffstat (limited to 'packages/MtpDocumentsProvider')
-rw-r--r--packages/MtpDocumentsProvider/res/values-as/strings.xml25
-rw-r--r--packages/MtpDocumentsProvider/res/values-or/strings.xml25
-rw-r--r--packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java20
3 files changed, 51 insertions, 19 deletions
diff --git a/packages/MtpDocumentsProvider/res/values-as/strings.xml b/packages/MtpDocumentsProvider/res/values-as/strings.xml
new file mode 100644
index 000000000000..c8bdbd6ce4bf
--- /dev/null
+++ b/packages/MtpDocumentsProvider/res/values-as/strings.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_label" msgid="6271216747302322594">"এমটিপি হ\'ষ্ট"</string>
+ <string name="downloads_app_label" msgid="7120690641874849726">"ডাউনল\'ডসমূহ"</string>
+ <string name="root_name" msgid="5819495383921089536">"<xliff:g id="DEVICE_MODEL">%1$s</xliff:g> <xliff:g id="STORAGE_NAME">%2$s</xliff:g>"</string>
+ <string name="accessing_notification_title" msgid="3030133609230917944">"<xliff:g id="DEVICE_MODEL">%1$s</xliff:g>ৰ পৰা ফাইলসমূহ চোৱা হৈছে"</string>
+ <string name="error_busy_device" msgid="3997316850357386589">"আনটো ডিভাইচ ব্যস্ত হৈ আছে। সেইটো উপলব্ধ নোহোৱালৈকে আপুনি ফাইলসমূহ স্থানান্তৰ কৰিব নোৱাৰে।"</string>
+ <string name="error_locked_device" msgid="7557872102188356147">"কোনো ফাইল পোৱা নগ\'ল। আনটো ডিভাইচ লক হৈ থাকিব পাৰে। যদি লক হৈ আছে, তেন্তে আনলক কৰি আকৌ চেষ্টা কৰক।"</string>
+</resources>
diff --git a/packages/MtpDocumentsProvider/res/values-or/strings.xml b/packages/MtpDocumentsProvider/res/values-or/strings.xml
new file mode 100644
index 000000000000..79de689eacf4
--- /dev/null
+++ b/packages/MtpDocumentsProvider/res/values-or/strings.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_label" msgid="6271216747302322594">"MTP ହୋଷ୍ଟ"</string>
+ <string name="downloads_app_label" msgid="7120690641874849726">"ଡାଉନଲୋଡ୍‌"</string>
+ <string name="root_name" msgid="5819495383921089536">"<xliff:g id="DEVICE_MODEL">%1$s</xliff:g> <xliff:g id="STORAGE_NAME">%2$s</xliff:g>"</string>
+ <string name="accessing_notification_title" msgid="3030133609230917944">"<xliff:g id="DEVICE_MODEL">%1$s</xliff:g>ରୁ ଫାଇଲ୍‍ ଆକ୍ସେସ୍‍ କରାଯାଉଛି"</string>
+ <string name="error_busy_device" msgid="3997316850357386589">"ଅନ୍ୟ ଡିଭାଇସଟି ବ୍ୟସ୍ତ ଅଛି। ଏହା ଉପଲବ୍ଧ ନହେବା ପର୍ଯ୍ୟନ୍ତ ଆପଣ ଫାଇଲ୍‍ ଟ୍ରାନ୍ସଫର୍‍ କରିପାରିବେ ନାହିଁ।"</string>
+ <string name="error_locked_device" msgid="7557872102188356147">"କୌଣସି ଫାଇଲ୍‍ ମିଳିଲା ନାହିଁ। ଅନ୍ୟ ଡିଭାଇସଟି ଲକ୍‍ ହୋଇଯାଇଥାଇପାରେ। ଯଦି ଏପରି ହୋଇଥାଏ, ଏହାକୁ ଅନଲକ୍‍ କରି ପୁଣି ଚେଷ୍ଟା କରନ୍ତୁ।"</string>
+</resources>
diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
index f243b51d6769..59c205aebe18 100644
--- a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
+++ b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
@@ -851,25 +851,7 @@ class MtpDatabase {
return DocumentsContract.Document.MIME_TYPE_DIR;
}
- final String formatCodeMimeType = MediaFile.getMimeTypeForFormatCode(info.getFormat());
- final String mediaFileMimeType = MediaFile.getMimeTypeForFile(info.getName());
-
- // Format code can be mapped with multiple mime types, e.g. FORMAT_MPEG is mapped with
- // audio/mp4 and video/mp4.
- // As file extension contains more information than format code, returns mime type obtained
- // from file extension if it is consistent with format code.
- if (mediaFileMimeType != null &&
- MediaFile.getFormatCode("", mediaFileMimeType) == info.getFormat()) {
- return mediaFileMimeType;
- }
- if (formatCodeMimeType != null) {
- return formatCodeMimeType;
- }
- if (mediaFileMimeType != null) {
- return mediaFileMimeType;
- }
- // We don't know the file type.
- return "application/octet-stream";
+ return MediaFile.getMimeType(info.getName(), info.getFormat());
}
private static int getRootFlags(int[] operationsSupported) {