summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AndroidManifest.xml1
-rw-r--r--res/mipmap-anydpi/ic_launcher.xml20
-rw-r--r--res/mipmap-hdpi/ic_background.pngbin0 -> 2361 bytes
-rw-r--r--res/mipmap-hdpi/ic_foreground.pngbin0 -> 10544 bytes
-rw-r--r--res/mipmap-hdpi/ic_launcher_gallery.pngbin20425 -> 0 bytes
-rw-r--r--res/mipmap-mdpi/ic_background.pngbin0 -> 960 bytes
-rw-r--r--res/mipmap-mdpi/ic_foreground.pngbin0 -> 5708 bytes
-rw-r--r--res/mipmap-mdpi/ic_launcher_gallery.pngbin17130 -> 0 bytes
-rw-r--r--res/mipmap-xhdpi/ic_background.pngbin0 -> 3325 bytes
-rw-r--r--res/mipmap-xhdpi/ic_foreground.pngbin0 -> 16385 bytes
-rw-r--r--res/mipmap-xhdpi/ic_launcher_gallery.pngbin24283 -> 0 bytes
-rw-r--r--res/mipmap-xxhdpi/ic_background.pngbin0 -> 5792 bytes
-rw-r--r--res/mipmap-xxhdpi/ic_foreground.pngbin0 -> 32204 bytes
-rw-r--r--res/mipmap-xxxhdpi/ic_background.pngbin0 -> 7947 bytes
-rw-r--r--res/mipmap-xxxhdpi/ic_foreground.pngbin0 -> 53009 bytes
-rw-r--r--res/values-ast-rES/strings.xml23
-rw-r--r--res/values-cy/strings.xml30
-rw-r--r--res/values-eo/strings.xml20
-rw-r--r--res/values-gd/strings.xml23
-rw-r--r--res/values-ku/strings.xml23
-rw-r--r--res/values-lb/strings.xml23
-rw-r--r--res/values-ug/strings.xml21
-rw-r--r--src/com/android/providers/media/MediaProvider.java18
23 files changed, 199 insertions, 3 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 305027bd..1cc2ab80 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -28,6 +28,7 @@
<application
android:name="com.android.providers.media.MediaApplication"
android:label="@string/app_label"
+ android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:supportsRtl="true"
android:forceQueryable="true"
diff --git a/res/mipmap-anydpi/ic_launcher.xml b/res/mipmap-anydpi/ic_launcher.xml
new file mode 100644
index 00000000..d8649ba5
--- /dev/null
+++ b/res/mipmap-anydpi/ic_launcher.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2018 The LineageOS 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.
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@mipmap/ic_background"/>
+ <foreground android:drawable="@mipmap/ic_foreground"/>
+</adaptive-icon>
+
diff --git a/res/mipmap-hdpi/ic_background.png b/res/mipmap-hdpi/ic_background.png
new file mode 100644
index 00000000..16bcdc58
--- /dev/null
+++ b/res/mipmap-hdpi/ic_background.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_foreground.png b/res/mipmap-hdpi/ic_foreground.png
new file mode 100644
index 00000000..99692957
--- /dev/null
+++ b/res/mipmap-hdpi/ic_foreground.png
Binary files differ
diff --git a/res/mipmap-hdpi/ic_launcher_gallery.png b/res/mipmap-hdpi/ic_launcher_gallery.png
deleted file mode 100644
index 23ea9989..00000000
--- a/res/mipmap-hdpi/ic_launcher_gallery.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-mdpi/ic_background.png b/res/mipmap-mdpi/ic_background.png
new file mode 100644
index 00000000..bc97fa9e
--- /dev/null
+++ b/res/mipmap-mdpi/ic_background.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_foreground.png b/res/mipmap-mdpi/ic_foreground.png
new file mode 100644
index 00000000..a11ed309
--- /dev/null
+++ b/res/mipmap-mdpi/ic_foreground.png
Binary files differ
diff --git a/res/mipmap-mdpi/ic_launcher_gallery.png b/res/mipmap-mdpi/ic_launcher_gallery.png
deleted file mode 100644
index e1a99498..00000000
--- a/res/mipmap-mdpi/ic_launcher_gallery.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_background.png b/res/mipmap-xhdpi/ic_background.png
new file mode 100644
index 00000000..f12d9c0f
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_background.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_foreground.png b/res/mipmap-xhdpi/ic_foreground.png
new file mode 100644
index 00000000..a63937e9
--- /dev/null
+++ b/res/mipmap-xhdpi/ic_foreground.png
Binary files differ
diff --git a/res/mipmap-xhdpi/ic_launcher_gallery.png b/res/mipmap-xhdpi/ic_launcher_gallery.png
deleted file mode 100644
index 79544a2b..00000000
--- a/res/mipmap-xhdpi/ic_launcher_gallery.png
+++ /dev/null
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_background.png b/res/mipmap-xxhdpi/ic_background.png
new file mode 100644
index 00000000..5affeba7
--- /dev/null
+++ b/res/mipmap-xxhdpi/ic_background.png
Binary files differ
diff --git a/res/mipmap-xxhdpi/ic_foreground.png b/res/mipmap-xxhdpi/ic_foreground.png
new file mode 100644
index 00000000..51c88b5e
--- /dev/null
+++ b/res/mipmap-xxhdpi/ic_foreground.png
Binary files differ
diff --git a/res/mipmap-xxxhdpi/ic_background.png b/res/mipmap-xxxhdpi/ic_background.png
new file mode 100644
index 00000000..89d2ea5f
--- /dev/null
+++ b/res/mipmap-xxxhdpi/ic_background.png
Binary files differ
diff --git a/res/mipmap-xxxhdpi/ic_foreground.png b/res/mipmap-xxxhdpi/ic_foreground.png
new file mode 100644
index 00000000..63a5fd2e
--- /dev/null
+++ b/res/mipmap-xxxhdpi/ic_foreground.png
Binary files differ
diff --git a/res/values-ast-rES/strings.xml b/res/values-ast-rES/strings.xml
new file mode 100644
index 00000000..44a27d0c
--- /dev/null
+++ b/res/values-ast-rES/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">Medios</string>
+ <string name="app_label">Almacenamientu de medios</string>
+ <string name="artist_label">Artista</string>
+ <string name="root_images">Imáxenes</string>
+ <string name="root_videos">Vídeos</string>
+ <string name="root_audio">Audiu</string>
+</resources>
diff --git a/res/values-cy/strings.xml b/res/values-cy/strings.xml
new file mode 100644
index 00000000..2f352b9f
--- /dev/null
+++ b/res/values-cy/strings.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">Cyfryngau</string>
+ <string name="storage_description">Storfa leol</string>
+ <string name="app_label">Storfa Cyfryngau</string>
+ <string name="artist_label">Artist</string>
+ <string name="root_images">Delweddau</string>
+ <string name="root_videos">Fideos</string>
+ <string name="root_audio">Sain</string>
+ <string name="permission_required">Rhaid cael caniatâd i addasu neu ddileu\u2019r eitem hon.</string>
+ <string name="permission_required_action">Parhau</string>
+ <string name="grant_dialog_button_allow">Caniatáu</string>
+ <string name="grant_dialog_button_deny">Gwrthod</string>
+ <string name="allow">Caniatáu</string>
+ <string name="deny">Gwrthod</string>
+</resources>
diff --git a/res/values-eo/strings.xml b/res/values-eo/strings.xml
new file mode 100644
index 00000000..14dc4fa2
--- /dev/null
+++ b/res/values-eo/strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="artist_label">Artisto</string>
+ <string name="root_images">Bildoj</string>
+ <string name="root_videos">Videoj</string>
+</resources>
diff --git a/res/values-gd/strings.xml b/res/values-gd/strings.xml
new file mode 100644
index 00000000..b9001004
--- /dev/null
+++ b/res/values-gd/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">Meadhanan</string>
+ <string name="app_label">Stòras nam meadhanan</string>
+ <string name="artist_label">Neach-ciùil</string>
+ <string name="root_images">Dealbhan</string>
+ <string name="root_videos">Videothan</string>
+ <string name="root_audio">Fuaimean</string>
+</resources>
diff --git a/res/values-ku/strings.xml b/res/values-ku/strings.xml
new file mode 100644
index 00000000..3b1511ba
--- /dev/null
+++ b/res/values-ku/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">ڕەنگاڵە</string>
+ <string name="app_label">بیرگەی ڕاگەیانەکان</string>
+ <string name="artist_label">هونەرمەند</string>
+ <string name="root_images">وێنەکان</string>
+ <string name="root_videos">ڤیدیۆکان</string>
+ <string name="root_audio">دەنگ</string>
+</resources>
diff --git a/res/values-lb/strings.xml b/res/values-lb/strings.xml
new file mode 100644
index 00000000..ffec3f5e
--- /dev/null
+++ b/res/values-lb/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">Medien</string>
+ <string name="app_label">Mediespäicher</string>
+ <string name="artist_label">Kënschtler</string>
+ <string name="root_images">Biller</string>
+ <string name="root_videos">Videoen</string>
+ <string name="root_audio">Audio</string>
+</resources>
diff --git a/res/values-ug/strings.xml b/res/values-ug/strings.xml
new file mode 100644
index 00000000..2049ad44
--- /dev/null
+++ b/res/values-ug/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="uid_label">ۋاسىتە</string>
+ <string name="app_label">ۋاسىتە ساقلىغۇچ</string>
+ <string name="artist_label">سەنئەتكار</string>
+ <string name="root_images">سۈرەتلەر</string>
+</resources>
diff --git a/src/com/android/providers/media/MediaProvider.java b/src/com/android/providers/media/MediaProvider.java
index 626bbb8e..251e18d9 100644
--- a/src/com/android/providers/media/MediaProvider.java
+++ b/src/com/android/providers/media/MediaProvider.java
@@ -2748,8 +2748,7 @@ public class MediaProvider extends ContentProvider {
private void assertFileColumnsSane(int match, Uri uri, ContentValues values)
throws VolumeArgumentException, VolumeNotFoundException {
if (!values.containsKey(MediaColumns.DATA)) return;
-
- final String volumeName = resolveVolumeName(uri);
+ final String volumeName = resolveVolumeName(uri, values.getAsString(MediaColumns.DATA));
try {
// Sanity check that the requested path actually lives on volume
final Collection<File> allowed = getVolumeScanPaths(volumeName);
@@ -3218,6 +3217,19 @@ public class MediaProvider extends ContentProvider {
}
}
+ private static @NonNull String resolveVolumeName(@NonNull Uri uri, @NonNull String path) {
+ final String volumeName = getVolumeName(uri);
+ if (MediaStore.VOLUME_EXTERNAL.equals(volumeName)) {
+ if (path != null) {
+ return getVolumeName(new File(path));
+ } else {
+ return MediaStore.VOLUME_EXTERNAL_PRIMARY;
+ }
+ } else {
+ return volumeName;
+ }
+ }
+
/**
* @deprecated all operations should be routed through the overload that
* accepts a {@link Bundle} of extras.
@@ -5807,7 +5819,7 @@ public class MediaProvider extends ContentProvider {
throw new FileNotFoundException();
}
} catch (IOException e) {
- Log.w(TAG, e);
+ if (LOGV) Log.w(TAG, e);
throw new FileNotFoundException(e.getMessage());
} finally {
restoreLocalCallingIdentity(token);