summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Xin Li <delphij@google.com> 2024-09-05 17:02:56 -0700
committer Xin Li <delphij@google.com> 2024-09-05 17:02:56 -0700
commit261464daca61b7317eb576ba33af01651c39cd5f (patch)
treefa0f3f76ed8d374debe81fa7a8902ba626bcb0cb
parent0025b72fb9ed29dfc343d0b7829634243aeeef43 (diff)
parent7cefdcc58a820fb0f50234d25c25153f88ba5c41 (diff)
Merge 24Q3 to AOSP main
Bug: 357762254 Merged-In: I083268cf23481ba8be9b903c6b6bcd19464adc37 Change-Id: Ieac06cc7ee58c013e486f5df4dc81fbadec4febd
-rw-r--r--proguard.flags7
-rw-r--r--res/color/search_chip_text_color.xml2
-rw-r--r--res/drawable/ic_check.xml2
-rw-r--r--res/layout/directory_header.xml3
-rw-r--r--res/values-ar/strings.xml4
-rw-r--r--res/values-b+sr+Latn/strings.xml2
-rw-r--r--res/values-es-rUS/inspector_strings.xml2
-rw-r--r--res/values-es-rUS/strings.xml76
-rw-r--r--res/values-es/inspector_strings.xml2
-rw-r--r--res/values-es/strings.xml18
-rw-r--r--res/values-fa/strings.xml2
-rw-r--r--res/values-fr-rCA/inspector_strings.xml2
-rw-r--r--res/values-fr-rCA/strings.xml58
-rw-r--r--res/values-is/strings.xml2
-rw-r--r--res/values-it/inspector_strings.xml2
-rw-r--r--res/values-it/strings.xml72
-rw-r--r--res/values-kn/strings.xml2
-rw-r--r--res/values-mk/inspector_strings.xml2
-rw-r--r--res/values-mk/strings.xml2
-rw-r--r--res/values-night/colors.xml2
-rw-r--r--res/values-ro/strings.xml2
-rw-r--r--res/values-ru/strings.xml2
-rw-r--r--res/values-si/strings.xml2
-rw-r--r--res/values-sr/strings.xml2
-rw-r--r--res/values-sv/strings.xml2
-rw-r--r--res/values-te/strings.xml4
-rw-r--r--res/values-th/strings.xml2
-rw-r--r--res/values-v31/dimens.xml2
-rw-r--r--res/values/colors.xml2
-rw-r--r--src/com/android/documentsui/BaseActivity.java29
-rw-r--r--src/com/android/documentsui/ConfigStore.java47
-rw-r--r--src/com/android/documentsui/DirectoryLoader.java3
-rw-r--r--src/com/android/documentsui/DocumentsApplication.java15
-rw-r--r--src/com/android/documentsui/ProfileTabs.java5
-rw-r--r--src/com/android/documentsui/UserManagerState.java33
-rw-r--r--src/com/android/documentsui/base/State.java3
-rw-r--r--src/com/android/documentsui/dirlist/AppsRowManager.java3
-rw-r--r--src/com/android/documentsui/dirlist/DirectoryFragment.java30
-rw-r--r--src/com/android/documentsui/dirlist/DocumentHolder.java2
-rw-r--r--src/com/android/documentsui/dirlist/GridDirectoryHolder.java8
-rw-r--r--src/com/android/documentsui/dirlist/GridDocumentHolder.java2
-rw-r--r--src/com/android/documentsui/dirlist/GridPhotoHolder.java12
-rw-r--r--src/com/android/documentsui/dirlist/IconHelper.java12
-rw-r--r--src/com/android/documentsui/dirlist/ListDocumentHolder.java2
-rw-r--r--src/com/android/documentsui/dirlist/ModelBackedDocumentsAdapter.java7
-rw-r--r--src/com/android/documentsui/picker/LastAccessedProvider.java4
-rw-r--r--src/com/android/documentsui/picker/PickActivity.java3
-rw-r--r--src/com/android/documentsui/picker/PickCountRecordProvider.java13
-rw-r--r--src/com/android/documentsui/queries/SearchHistoryManager.java7
-rw-r--r--src/com/android/documentsui/roots/ProvidersCache.java4
-rw-r--r--src/com/android/documentsui/sidebar/RootsFragment.java11
-rw-r--r--tests/Android.bp9
-rw-r--r--tests/common/com/android/documentsui/TestUserManagerState.java9
-rw-r--r--tests/functional/com/android/documentsui/FileCopyUiTest.java23
-rw-r--r--tests/unit/com/android/documentsui/ProfileTabsTest.java18
-rw-r--r--tests/unit/com/android/documentsui/UserManagerStateTest.java6
-rw-r--r--tests/unit/com/android/documentsui/dirlist/AppsRowManagerTest.java1
-rw-r--r--tests/unit/com/android/documentsui/dirlist/IconHelperTest.java15
-rw-r--r--tests/unit/com/android/documentsui/files/ActionHandlerTest.java19
-rw-r--r--tests/unit/com/android/documentsui/sidebar/RootsFragmentTest.java7
-rw-r--r--tests/unit/com/android/documentsui/sidebar/UserItemsCombinerTest.java1
61 files changed, 385 insertions, 262 deletions
diff --git a/proguard.flags b/proguard.flags
index a9483308c..2390e8f56 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -25,3 +25,10 @@
# To prevent class not found exception in org.brotli.dec.Dictionary
-keep final class org.brotli.dec.DictionaryData
+# To prevent resource fields not found exception on running DocumentsUIGoogleTests module
+-keepclassmembers class com.android.documentsui.R$* {
+ public static <fields>;
+}
+
+# Keep Apache Commons Compress classes
+-keep class org.apache.commons.compress.** { *; } \ No newline at end of file
diff --git a/res/color/search_chip_text_color.xml b/res/color/search_chip_text_color.xml
index 262bede41..4e6e3a9d7 100644
--- a/res/color/search_chip_text_color.xml
+++ b/res/color/search_chip_text_color.xml
@@ -16,7 +16,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_selected="true" android:color="?android:colorControlActivated"/>
+ <item android:state_selected="true" android:color="@color/search_chip_text_selected_color"/>
<item android:state_enabled="true" android:color="?android:textColorSecondary"/>
<item android:state_enabled="false" android:color="?android:textColorSecondary" android:alpha="0.3"/>
</selector> \ No newline at end of file
diff --git a/res/drawable/ic_check.xml b/res/drawable/ic_check.xml
index 2f02c9a6c..1d7aed0cb 100644
--- a/res/drawable/ic_check.xml
+++ b/res/drawable/ic_check.xml
@@ -18,7 +18,7 @@ Copyright (C) 2018 The Android Open Source Project
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
- android:tint="?android:colorControlActivated">
+ android:tint="@color/search_chip_text_selected_color">
<path
android:fillColor="@android:color/white"
android:pathData="vM9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>
diff --git a/res/layout/directory_header.xml b/res/layout/directory_header.xml
index 4d602ac33..af730829f 100644
--- a/res/layout/directory_header.xml
+++ b/res/layout/directory_header.xml
@@ -69,7 +69,8 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/root_info_header_horizontal_padding"
android:layout_marginEnd="@dimen/root_info_header_horizontal_padding"
- android:minHeight="@dimen/root_info_header_height">
+ android:minHeight="@dimen/root_info_header_height"
+ android:accessibilityHeading="true">
<TextView
android:id="@+id/header_title"
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 0c5432a6a..84917168f 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -102,8 +102,8 @@
<string name="cant_select_personal_files_error_message" msgid="4105905035459118209">"لا يسمح لك مشرف تكنولوجيا المعلومات بالوصول إلى الملفات الشخصية من تطبيق عمل."</string>
<string name="cant_select_cross_profile_files_error_title" msgid="17010948874969413">"يتعذّر اختيار ملفات <xliff:g id="PROFILE">%1$s</xliff:g>."</string>
<string name="cant_select_cross_profile_files_error_message" msgid="3815829574883844944">"لا يسمح لك مشرف تكنولوجيا المعلومات في مؤسستك بالوصول إلى ملفات <xliff:g id="PROFILE_0">%1$s</xliff:g> من خلال تطبيق <xliff:g id="PROFILE_1">%2$s</xliff:g>."</string>
- <string name="cant_save_to_work_error_title" msgid="1351323070040641358">"لا يمكن حفظ الملفات في الملف الشخصي للعمل"</string>
- <string name="cant_save_to_work_error_message" msgid="4975583233814059890">"لا يسمح لك مشرف تكنولوجيا المعلومات بحفظ الملفات الشخصية في ملفك الشخصي للعمل."</string>
+ <string name="cant_save_to_work_error_title" msgid="1351323070040641358">"لا يمكن حفظ الملفات في ملف العمل"</string>
+ <string name="cant_save_to_work_error_message" msgid="4975583233814059890">"لا يسمح لك مشرف تكنولوجيا المعلومات بحفظ الملفات الشخصية في ملف العمل الخاص بك."</string>
<string name="cant_save_to_personal_error_title" msgid="858327493694069780">"لا يمكن حفظ الملفات في الملف الشخصي"</string>
<string name="cant_save_to_personal_error_message" msgid="6991758723736381751">"لا يسمح لك مشرف تكنولوجيا المعلومات بحفظ ملفات العمل في ملفك الشخصي."</string>
<string name="cant_save_to_cross_profile_error_title" msgid="5158984057654779022">"يتعذّر الحفظ في ملف <xliff:g id="PROFILE">%1$s</xliff:g>."</string>
diff --git a/res/values-b+sr+Latn/strings.xml b/res/values-b+sr+Latn/strings.xml
index a131e269e..fca11a776 100644
--- a/res/values-b+sr+Latn/strings.xml
+++ b/res/values-b+sr+Latn/strings.xml
@@ -286,7 +286,7 @@
<string name="root_info_header_image_app_with_summary" msgid="6404842960923224778">"Slike iz: <xliff:g id="LABEL">%1$s</xliff:g>/<xliff:g id="SUMMARY">%2$s</xliff:g>"</string>
<string name="chip_title_images" msgid="7838299046109841015">"Slike"</string>
<string name="chip_title_audio" msgid="1032801828748235436">"Zvuk"</string>
- <string name="chip_title_videos" msgid="7011260091979776447">"Video snimci"</string>
+ <string name="chip_title_videos" msgid="7011260091979776447">"Videi"</string>
<string name="chip_title_documents" msgid="7432457563000753983">"Dokumenti"</string>
<string name="chip_title_large_files" msgid="7740269190493883980">"Velike datoteke"</string>
<string name="chip_title_from_this_week" msgid="4961536405220379672">"Ove nedelje"</string>
diff --git a/res/values-es-rUS/inspector_strings.xml b/res/values-es-rUS/inspector_strings.xml
index f35859315..a5a479ca4 100644
--- a/res/values-es-rUS/inspector_strings.xml
+++ b/res/values-es-rUS/inspector_strings.xml
@@ -18,7 +18,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="inspector_title" msgid="1924760928091740238">"Información"</string>
<string name="inspector_load_error" msgid="7522190243413249291">"No se pudo cargar la información del archivo"</string>
- <string name="inspector_debug_section" msgid="2576052661505700421">"Información de depuración (solo programadores)"</string>
+ <string name="inspector_debug_section" msgid="2576052661505700421">"Información de depuración (solo desarrolladores)"</string>
<string name="inspector_debug_metadata_section" msgid="5875140675600744846">"Metadatos RAW: <xliff:g id="METADATATYPE">%1$s</xliff:g>"</string>
<string name="inspector_metadata_section" msgid="6077622515328240575">"Detalles del contenido multimedia"</string>
<string name="handler_app_file_opens_with" msgid="5272329600389613550">"Este tipo de archivo se abre con"</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 595f35876..c7f1e717e 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -30,7 +30,7 @@
<string name="menu_grid" msgid="1453636521731880680">"Vista de cuadrícula"</string>
<string name="menu_list" msgid="6714267452146410402">"Vista de lista"</string>
<string name="menu_search" msgid="1876699106790719849">"Buscar"</string>
- <string name="menu_settings" msgid="6520844520117939047">"Opciones almacenamiento"</string>
+ <string name="menu_settings" msgid="6520844520117939047">"Opciones de almacenamiento"</string>
<string name="menu_open" msgid="9092138100049759315">"Abrir"</string>
<string name="menu_open_with" msgid="5507647065467520229">"Abrir con"</string>
<string name="menu_open_in_new_window" msgid="6686563636123311276">"Abrir en ventana nueva"</string>
@@ -131,29 +131,29 @@
<string name="delete_notification_title" msgid="2512757431856830792">"Borrando los archivos"</string>
<string name="copy_remaining" msgid="5390517377265177727">"<xliff:g id="DURATION">%s</xliff:g> restantes"</string>
<plurals name="copy_begin" formatted="false" msgid="151184708996738192">
- <item quantity="many">Copiando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="other">Copiando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="one">Copiando <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
+ <item quantity="many">Copiando <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos.</item>
+ <item quantity="other">Copiando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos.</item>
+ <item quantity="one">Copiando <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
</plurals>
<plurals name="compress_begin" formatted="false" msgid="3534158317098678895">
- <item quantity="many">Comprimiendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="other">Comprimiendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="one">Comprimiendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo</item>
+ <item quantity="many">Comprimiendo <xliff:g id="COUNT_1">%1$d</xliff:g> de archivos.</item>
+ <item quantity="other">Comprimiendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
+ <item quantity="one">Comprimiendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo.</item>
</plurals>
<plurals name="extract_begin" formatted="false" msgid="1006380679562903749">
- <item quantity="many">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="other">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="one">Extrayendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo</item>
+ <item quantity="many">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> de archivos.</item>
+ <item quantity="other">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
+ <item quantity="one">Extrayendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo.</item>
</plurals>
<plurals name="move_begin" formatted="false" msgid="1464229874265756956">
- <item quantity="many">Moviendo <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="other">Moviendo <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="one">Moviendo <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
+ <item quantity="many">Moviendo <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos.</item>
+ <item quantity="other">Moviendo <xliff:g id="COUNT_1">%1$d</xliff:g> elementos.</item>
+ <item quantity="one">Moviendo <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
</plurals>
<plurals name="deleting" formatted="false" msgid="1729138001178158901">
- <item quantity="many">Borrando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="other">Borrando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
- <item quantity="one">Borrando <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
+ <item quantity="many">Borrando <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos.</item>
+ <item quantity="other">Borrando <xliff:g id="COUNT_1">%1$d</xliff:g> elementos.</item>
+ <item quantity="one">Borrando <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
</plurals>
<string name="undo" msgid="2902438994196400565">"Deshacer"</string>
<string name="copy_preparing" msgid="4759516490222449324">"Preparando…"</string>
@@ -163,22 +163,22 @@
<string name="delete_preparing" msgid="7339349837842802508">"Preparando…"</string>
<string name="delete_progress" msgid="2627631054702306423">"<xliff:g id="COUNT_0">%1$d</xliff:g>/<xliff:g id="TOTALCOUNT">%2$d</xliff:g>"</string>
<plurals name="copy_error_notification_title" formatted="false" msgid="3188432450429390963">
- <item quantity="many">No se pudieron copiar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
+ <item quantity="many">No se pudieron copiar <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos</item>
<item quantity="other">No se pudieron copiar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
<item quantity="one">No se pudo copiar <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<plurals name="compress_error_notification_title" formatted="false" msgid="3043630066678213644">
- <item quantity="many">No fue posible comprimir <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="other">No fue posible comprimir <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
- <item quantity="one">No fue posible comprimir <xliff:g id="COUNT_0">%1$d</xliff:g> archivo</item>
+ <item quantity="many">No se pudieron comprimir <xliff:g id="COUNT_1">%1$d</xliff:g> de archivos</item>
+ <item quantity="other">No se pudieron comprimir <xliff:g id="COUNT_1">%1$d</xliff:g> archivos</item>
+ <item quantity="one">No se pudo comprimir <xliff:g id="COUNT_0">%1$d</xliff:g> archivo</item>
</plurals>
<plurals name="move_error_notification_title" formatted="false" msgid="2185736082411854754">
- <item quantity="many">No se pudieron mover <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
+ <item quantity="many">No se pudieron mover <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos</item>
<item quantity="other">No se pudieron mover <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
<item quantity="one">No se pudo mover <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<plurals name="delete_error_notification_title" formatted="false" msgid="7568122018481625267">
- <item quantity="many">No se pudieron borrar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
+ <item quantity="many">No se pudieron borrar <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos</item>
<item quantity="other">No se pudieron borrar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos</item>
<item quantity="one">No se pudo borrar <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
@@ -195,9 +195,9 @@
<item quantity="one">No se comprimió el siguiente archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="extract_failure_alert_content" formatted="false" msgid="7572748127571720803">
- <item quantity="many">No se extrajeron los siguientes archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="other">No se extrajeron los siguientes archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="one">No se extrajo el siguiente archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
+ <item quantity="many">No se extrajeron estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="other">No se extrajeron estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="one">No se extrajo este archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="move_failure_alert_content" formatted="false" msgid="2747390342670799196">
<item quantity="many">No se movieron los siguientes archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
@@ -210,9 +210,9 @@
<item quantity="one">No se borró el siguiente archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="copy_converted_warning_content" formatted="false" msgid="7433742181712126588">
- <item quantity="many">Los siguientes archivos se convirtieron a otro formato: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="other">Los siguientes archivos se convirtieron a otro formato: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="one">El siguiente archivo se convirtió a otro formato: <xliff:g id="LIST_0">%1$s</xliff:g></item>
+ <item quantity="many">Estos archivos se convirtieron a otro formato: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="other">Estos archivos se convirtieron a otro formato: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="one">Este archivo se convirtió a otro formato: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="clipboard_files_clipped" formatted="false" msgid="4847061634862926902">
<item quantity="many">Se copiaron <xliff:g id="COUNT_1">%1$d</xliff:g> elementos al portapapeles.</item>
@@ -242,19 +242,19 @@
<string name="delete_filename_confirmation_message" msgid="8338069763240613258">"¿Deseas borrar el archivo \"<xliff:g id="NAME">%1$s</xliff:g>\"?"</string>
<string name="delete_foldername_confirmation_message" msgid="9084085260877704140">"¿Deseas borrar la carpeta \"<xliff:g id="NAME">%1$s</xliff:g>\" y su contenido?"</string>
<plurals name="delete_files_confirmation_message" formatted="false" msgid="4866664063250034142">
- <item quantity="many">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> archivos?</item>
- <item quantity="other">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> archivos?</item>
- <item quantity="one">¿Deseas borrar <xliff:g id="COUNT_0">%1$d</xliff:g> archivo?</item>
+ <item quantity="many">¿Quieres borrar <xliff:g id="COUNT_1">%1$d</xliff:g> de archivos?</item>
+ <item quantity="other">¿Quieres borrar <xliff:g id="COUNT_1">%1$d</xliff:g> archivos?</item>
+ <item quantity="one">¿Quieres borrar <xliff:g id="COUNT_0">%1$d</xliff:g> archivo?</item>
</plurals>
<plurals name="delete_folders_confirmation_message" formatted="false" msgid="1028946402799686388">
- <item quantity="many">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> carpetas y su contenido?</item>
- <item quantity="other">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> carpetas y su contenido?</item>
- <item quantity="one">¿Deseas borrar <xliff:g id="COUNT_0">%1$d</xliff:g> carpeta y su contenido?</item>
+ <item quantity="many">¿Quieres borrar <xliff:g id="COUNT_1">%1$d</xliff:g> de carpetas y su contenido?</item>
+ <item quantity="other">¿Quieres borrar <xliff:g id="COUNT_1">%1$d</xliff:g> carpetas y su contenido?</item>
+ <item quantity="one">¿Quieres borrar <xliff:g id="COUNT_0">%1$d</xliff:g> carpeta y su contenido?</item>
</plurals>
<plurals name="delete_items_confirmation_message" formatted="false" msgid="7285090426511028179">
- <item quantity="many">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos?</item>
- <item quantity="other">¿Deseas borrar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos?</item>
- <item quantity="one">¿Deseas borrar <xliff:g id="COUNT_0">%1$d</xliff:g> elemento?</item>
+ <item quantity="many">¿Borrar <xliff:g id="COUNT_1">%1$d</xliff:g> de elementos?</item>
+ <item quantity="other">¿Borrar <xliff:g id="COUNT_1">%1$d</xliff:g> elementos?</item>
+ <item quantity="one">¿Borrar <xliff:g id="COUNT_0">%1$d</xliff:g> elemento?</item>
</plurals>
<string name="images_shortcut_label" msgid="2545168016070493574">"Imágenes"</string>
<string name="archive_loading_failed" msgid="7243436722828766996">"No es posible abrir el archivo para navegar, ya que el archivo está dañado o el formato no es compatible."</string>
@@ -306,7 +306,7 @@
<string name="search_bar_hint" msgid="146031513183888721">"Buscar este dispositivo"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Borrar historial de búsqueda de <xliff:g id="TEXT">%1$s</xliff:g>"</string>
<string name="personal_tab" msgid="3878576287868528503">"Personal"</string>
- <string name="work_tab" msgid="7265359366883747413">"De trabajo"</string>
+ <string name="work_tab" msgid="7265359366883747413">"Trabajo"</string>
<string name="a11y_work" msgid="7504431382825242153">"Trabajo"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"No puedes transferir archivos de otra app."</string>
<string name="grid_mode_showing" msgid="2803166871485028508">"Se muestra en modo de cuadrícula."</string>
diff --git a/res/values-es/inspector_strings.xml b/res/values-es/inspector_strings.xml
index 2e12fdc09..2dcaddc7f 100644
--- a/res/values-es/inspector_strings.xml
+++ b/res/values-es/inspector_strings.xml
@@ -33,7 +33,7 @@
<string name="metadata_camera" msgid="2363009732801281319">"Cámara"</string>
<string name="metadata_camera_format" msgid="1494489751904311612">"<xliff:g id="MAKE">%1$s</xliff:g> <xliff:g id="MODEL">%2$s</xliff:g>"</string>
<string name="metadata_aperture" msgid="6538741952698935357">"Apertura"</string>
- <string name="metadata_shutter_speed" msgid="8204739885103326131">"Velocidad del obturador"</string>
+ <string name="metadata_shutter_speed" msgid="8204739885103326131">"Velocidad de disparo"</string>
<string name="metadata_duration" msgid="3115494422055472715">"Duración"</string>
<string name="metadata_date_time" msgid="1090351199248114406">"Fecha de la foto"</string>
<string name="metadata_focal_length" msgid="3440735161407699893">"Longitud focal"</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 57e5b14cb..573a6768b 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -141,9 +141,9 @@
<item quantity="one">Comprimiendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo.</item>
</plurals>
<plurals name="extract_begin" formatted="false" msgid="1006380679562903749">
- <item quantity="many">Se están extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
- <item quantity="other">Se están extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
- <item quantity="one">Se está extrayendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo.</item>
+ <item quantity="many">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
+ <item quantity="other">Extrayendo <xliff:g id="COUNT_1">%1$d</xliff:g> archivos.</item>
+ <item quantity="one">Extrayendo <xliff:g id="COUNT_0">%1$d</xliff:g> archivo.</item>
</plurals>
<plurals name="move_begin" formatted="false" msgid="1464229874265756956">
<item quantity="many">Moviendo <xliff:g id="COUNT_1">%1$d</xliff:g> elementos.</item>
@@ -195,14 +195,14 @@
<item quantity="one">No se ha podido comprimir este archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="extract_failure_alert_content" formatted="false" msgid="7572748127571720803">
- <item quantity="many">No se han podido extraer estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="other">No se han podido extraer estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="one">No se ha podido extraer este archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
+ <item quantity="many">Estos archivos no se han extraído: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="other">Estos archivos no se han extraído: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="one">Este archivo no se ha extraído: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="move_failure_alert_content" formatted="false" msgid="2747390342670799196">
- <item quantity="many">No se han podido mover estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="other">No se han podido mover estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="one">No se ha podido mover este archivo: <xliff:g id="LIST_0">%1$s</xliff:g></item>
+ <item quantity="many">Estos archivos no se han movido: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="other">Estos archivos no se han movido: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="one">Este archivo no se ha movido: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="delete_failure_alert_content" formatted="false" msgid="6122372614839711711">
<item quantity="many">No se han podido eliminar estos archivos: <xliff:g id="LIST_1">%1$s</xliff:g></item>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index ea7e35954..7162acf7b 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -173,7 +173,7 @@
<item quantity="one"> <xliff:g id="COUNT_1">%1$d</xliff:g> مورد حذف نشد</item>
<item quantity="other"> <xliff:g id="COUNT_1">%1$d</xliff:g> مورد حذف نشد</item>
</plurals>
- <string name="notification_touch_for_details" msgid="2385563502445129570">"برای مشاهده جزئیات ضربه بزنید"</string>
+ <string name="notification_touch_for_details" msgid="2385563502445129570">"برای مشاهده جزئیات تک‌ضرب بزنید"</string>
<string name="close" msgid="905969391788869975">"بستن"</string>
<plurals name="copy_failure_alert_content" formatted="false" msgid="5570549471912990536">
<item quantity="one">این فایل‌ها کپی نشدند: <xliff:g id="LIST_1">%1$s</xliff:g></item>
diff --git a/res/values-fr-rCA/inspector_strings.xml b/res/values-fr-rCA/inspector_strings.xml
index fc49cbe37..2cf15925f 100644
--- a/res/values-fr-rCA/inspector_strings.xml
+++ b/res/values-fr-rCA/inspector_strings.xml
@@ -18,7 +18,7 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="inspector_title" msgid="1924760928091740238">"Renseignements"</string>
<string name="inspector_load_error" msgid="7522190243413249291">"Impossible de charger les renseignements sur le fichier"</string>
- <string name="inspector_debug_section" msgid="2576052661505700421">"Données de débogage (concepteurs uniquement)"</string>
+ <string name="inspector_debug_section" msgid="2576052661505700421">"Données de débogage (développeurs uniquement)"</string>
<string name="inspector_debug_metadata_section" msgid="5875140675600744846">"Métadonnées brutes : <xliff:g id="METADATATYPE">%1$s</xliff:g>"</string>
<string name="inspector_metadata_section" msgid="6077622515328240575">"Détails des médias"</string>
<string name="handler_app_file_opens_with" msgid="5272329600389613550">"Ce type de fichier s\'ouvre avec"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index e2397d122..c61478375 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -65,9 +65,9 @@
<string name="button_dismiss" msgid="7235249361023803349">"Fermer"</string>
<string name="button_retry" msgid="4011461781916631389">"Réessayer"</string>
<string name="button_clear" msgid="5412304437764369441">"Effacer"</string>
- <string name="button_show_provider" msgid="6905880493806292753">"Afficher dans l\'application du fournisseur"</string>
+ <string name="button_show_provider" msgid="6905880493806292753">"Afficher dans l\'appli du fournisseur"</string>
<string name="button_back" msgid="1888621708934742182">"Retour"</string>
- <string name="not_sorted" msgid="7813496644889115530">"Non trié"</string>
+ <string name="not_sorted" msgid="7813496644889115530">"Non triés"</string>
<string name="sort_dimension_name" msgid="6325591541414177579">"Nom"</string>
<string name="sort_dimension_summary" msgid="7724534446881397860">"Résumé"</string>
<string name="sort_dimension_file_type" msgid="5779709622922085381">"Type"</string>
@@ -92,16 +92,16 @@
<string name="save_error" msgid="8631128801982095782">"Échec de l\'enregistrement du document"</string>
<string name="create_error" msgid="3092144450044861994">"Échec de la création du dossier"</string>
<string name="query_error" msgid="6625421453613879336">"Impossible de charger le contenu pour le moment"</string>
- <string name="quiet_mode_error_title" msgid="554319751414657910">"Les applications professionnelles sont interrompues"</string>
- <string name="quiet_mode_button" msgid="8051436551926677305">"Activer les applications professionnelles"</string>
- <string name="profile_quiet_mode_error_title" msgid="7126962749634841843">"Les applications du profil de type <xliff:g id="PROFILE">%1$s</xliff:g> sont interrompues"</string>
- <string name="profile_quiet_mode_button" msgid="6791235010992920102">"Activer les applications de type : <xliff:g id="PROFILE">%1$s</xliff:g>"</string>
+ <string name="quiet_mode_error_title" msgid="554319751414657910">"Les applis professionnelles sont interrompues"</string>
+ <string name="quiet_mode_button" msgid="8051436551926677305">"Activer les applis professionnelles"</string>
+ <string name="profile_quiet_mode_error_title" msgid="7126962749634841843">"Les applis du profil de type <xliff:g id="PROFILE">%1$s</xliff:g> sont interrompues"</string>
+ <string name="profile_quiet_mode_button" msgid="6791235010992920102">"Activer les applis de type : <xliff:g id="PROFILE">%1$s</xliff:g>"</string>
<string name="cant_select_work_files_error_title" msgid="6688716319549644354">"Impossible de sélectionner des fichiers professionnels"</string>
- <string name="cant_select_work_files_error_message" msgid="683480676150690641">"Votre administrateur informatique ne vous autorise pas à accéder à des fichiers professionnels à partir d\'une application personnelle"</string>
+ <string name="cant_select_work_files_error_message" msgid="683480676150690641">"Votre administrateur informatique ne vous autorise pas à accéder à des fichiers professionnels à partir d\'une appli personnelle"</string>
<string name="cant_select_personal_files_error_title" msgid="3200697170148617742">"Impossible de sélectionner des fichiers personnels"</string>
- <string name="cant_select_personal_files_error_message" msgid="4105905035459118209">"Votre administrateur informatique ne vous autorise pas à accéder à des fichiers personnels à partir d\'une application professionnelle"</string>
+ <string name="cant_select_personal_files_error_message" msgid="4105905035459118209">"Votre administrateur informatique ne vous autorise pas à accéder à des fichiers personnels à partir d\'une appli professionnelle"</string>
<string name="cant_select_cross_profile_files_error_title" msgid="17010948874969413">"Impossible de sélectionner les fichiers de type <xliff:g id="PROFILE">%1$s</xliff:g>"</string>
- <string name="cant_select_cross_profile_files_error_message" msgid="3815829574883844944">"Votre administrateur informatique ne vous autorise pas à accéder aux fichiers de type <xliff:g id="PROFILE_0">%1$s</xliff:g> à partir d\'une application du profil suivant : <xliff:g id="PROFILE_1">%2$s</xliff:g>"</string>
+ <string name="cant_select_cross_profile_files_error_message" msgid="3815829574883844944">"Votre administrateur informatique ne vous autorise pas à accéder aux fichiers de type <xliff:g id="PROFILE_0">%1$s</xliff:g> à partir d\'une appli du profil suivant : <xliff:g id="PROFILE_1">%2$s</xliff:g>"</string>
<string name="cant_save_to_work_error_title" msgid="1351323070040641358">"Ιmpossible d\'enregistrer dans le profil professionnel"</string>
<string name="cant_save_to_work_error_message" msgid="4975583233814059890">"Votre administrateur informatique ne vous autorise pas à enregistrer des fichiers personnels dans votre profil professionnel"</string>
<string name="cant_save_to_personal_error_title" msgid="858327493694069780">"Impossible d\'enregistrer dans le profil personnel"</string>
@@ -115,7 +115,7 @@
<string name="root_type_service" msgid="6521366147466512289">"Services de stockage"</string>
<string name="root_type_shortcut" msgid="6059343175525442279">"Raccourcis"</string>
<string name="root_type_device" msgid="1713604128005476585">"Appareils"</string>
- <string name="root_type_apps" msgid="8646073235029886342">"Plus d\'applications"</string>
+ <string name="root_type_apps" msgid="8646073235029886342">"Plus d\'applis"</string>
<string name="empty" msgid="5300254272613103004">"Aucun élément"</string>
<string name="no_results" msgid="2371026325236359209">"Aucune correspondance dans %1$s"</string>
<string name="toast_no_application" msgid="7555319548595113121">"Impossible d\'ouvrir le fichier"</string>
@@ -131,9 +131,9 @@
<string name="delete_notification_title" msgid="2512757431856830792">"Suppression des fichiers"</string>
<string name="copy_remaining" msgid="5390517377265177727">"Temps restant : <xliff:g id="DURATION">%s</xliff:g>"</string>
<plurals name="copy_begin" formatted="false" msgid="151184708996738192">
- <item quantity="one">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> élément en cours.</item>
- <item quantity="many">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours.</item>
- <item quantity="other">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours.</item>
+ <item quantity="one">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> élément en cours…</item>
+ <item quantity="many">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> d\'éléments en cours…</item>
+ <item quantity="other">Copie de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours…</item>
</plurals>
<plurals name="compress_begin" formatted="false" msgid="3534158317098678895">
<item quantity="one">Compression de <xliff:g id="COUNT_1">%1$d</xliff:g> fichier en cours.</item>
@@ -146,9 +146,9 @@
<item quantity="other">Extraction de <xliff:g id="COUNT_1">%1$d</xliff:g> fichiers en cours.</item>
</plurals>
<plurals name="move_begin" formatted="false" msgid="1464229874265756956">
- <item quantity="one">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> élément en cours.</item>
- <item quantity="many">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours.</item>
- <item quantity="other">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours.</item>
+ <item quantity="one">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> élément en cours…</item>
+ <item quantity="many">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> d\'éléments en cours…</item>
+ <item quantity="other">Déplacement de <xliff:g id="COUNT_1">%1$d</xliff:g> éléments en cours…</item>
</plurals>
<plurals name="deleting" formatted="false" msgid="1729138001178158901">
<item quantity="one">Suppression de <xliff:g id="COUNT_1">%1$d</xliff:g> élément en cours.</item>
@@ -216,7 +216,7 @@
</plurals>
<plurals name="clipboard_files_clipped" formatted="false" msgid="4847061634862926902">
<item quantity="one"><xliff:g id="COUNT_1">%1$d</xliff:g> élément copié dans le presse-papiers.</item>
- <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> éléments copiés dans le presse-papiers.</item>
+ <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> d\'éléments copiés dans le presse-papiers.</item>
<item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> éléments copiés dans le presse-papiers.</item>
</plurals>
<string name="file_operation_rejected" msgid="4301554203329008794">"Opération relative au fichier non prise en charge"</string>
@@ -242,19 +242,19 @@
<string name="delete_filename_confirmation_message" msgid="8338069763240613258">"Supprimer « <xliff:g id="NAME">%1$s</xliff:g> »?"</string>
<string name="delete_foldername_confirmation_message" msgid="9084085260877704140">"Supprimer le dossier « <xliff:g id="NAME">%1$s</xliff:g> » et son contenu?"</string>
<plurals name="delete_files_confirmation_message" formatted="false" msgid="4866664063250034142">
- <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> fichier?</item>
- <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> fichiers?</item>
- <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> fichiers?</item>
+ <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> fichier?</item>
+ <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> de fichiers?</item>
+ <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> fichiers?</item>
</plurals>
<plurals name="delete_folders_confirmation_message" formatted="false" msgid="1028946402799686388">
- <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> dossier et son contenu?</item>
- <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> dossiers et leur contenu?</item>
- <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> dossiers et leur contenu?</item>
+ <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> dossier et son contenu?</item>
+ <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> de dossiers et leurs contenus?</item>
+ <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> dossiers et leurs contenus?</item>
</plurals>
<plurals name="delete_items_confirmation_message" formatted="false" msgid="7285090426511028179">
- <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> élément?</item>
- <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> éléments?</item>
- <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> éléments?</item>
+ <item quantity="one">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> élément?</item>
+ <item quantity="many">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> d\'éléments?</item>
+ <item quantity="other">Supprimer <xliff:g id="COUNT_1">%1$d</xliff:g> éléments?</item>
</plurals>
<string name="images_shortcut_label" msgid="2545168016070493574">"Images"</string>
<string name="archive_loading_failed" msgid="7243436722828766996">"Impossible d\'ouvrir l\'archive pour la navigation. Le fichier pourrait être corrompu ou être dans un format incompatible."</string>
@@ -295,11 +295,11 @@
<string name="preview_file" msgid="4056622696305432343">"Afficher un aperçu du fichier <xliff:g id="FILENAME">%1$s</xliff:g>"</string>
<string name="preview_work_file" msgid="4495643735563487273">"Afficher l\'aperçu du fichier professionnel <xliff:g id="FILENAME">%1$s</xliff:g>"</string>
<string name="preview_cross_profile_file" msgid="7457849216193029610">"Afficher un aperçu du fichier de type <xliff:g id="PROFILE">%1$s</xliff:g> : <xliff:g id="FILENAME">%2$s</xliff:g>"</string>
- <string name="apps_row_title" msgid="3340490016663092925">"Parcourir les fichiers dans d\'autres applications"</string>
+ <string name="apps_row_title" msgid="3340490016663092925">"Parcourir les fichiers dans d\'autres applis"</string>
<string name="anonymous_application" msgid="7633027057951625862">"Anonyme"</string>
<string name="open_tree_button" msgid="6402871398424497776">"Utiliser ce dossier"</string>
<string name="open_tree_dialog_title" msgid="6339509533852318569">"Autoriser <xliff:g id="APPNAME">%1$s</xliff:g> à accéder aux fichiers dans <xliff:g id="DIRECTORY">%2$s</xliff:g>?"</string>
- <string name="open_tree_dialog_message" msgid="4120695398430659628">"Cela permettra à <xliff:g id="APPNAME">%1$s</xliff:g> d\'accéder au contenu actuel et futur stocké dans <xliff:g id="DIRECTORY">%2$s</xliff:g>."</string>
+ <string name="open_tree_dialog_message" msgid="4120695398430659628">"Cela permettra à <xliff:g id="APPNAME">%1$s</xliff:g> d\'accéder à partir de maintenant au contenu stocké dans <xliff:g id="DIRECTORY">%2$s</xliff:g>."</string>
<string name="directory_blocked_header_title" msgid="1164584889578740066">"Impossible d\'utiliser ce dossier"</string>
<string name="directory_blocked_header_subtitle" msgid="2829150911849033408">"Pour protéger votre confidentialité, choisissez un autre dossier"</string>
<string name="create_new_folder_button" msgid="8859613309559794890">"Créer un dossier"</string>
@@ -308,7 +308,7 @@
<string name="personal_tab" msgid="3878576287868528503">"Personnel"</string>
<string name="work_tab" msgid="7265359366883747413">"Professionnel"</string>
<string name="a11y_work" msgid="7504431382825242153">"Travail"</string>
- <string name="drag_from_another_app" msgid="8310249276199969905">"Vous ne pouvez pas déplacer de fichiers d\'une autre application."</string>
+ <string name="drag_from_another_app" msgid="8310249276199969905">"Vous ne pouvez pas déplacer de fichiers d\'une autre appli."</string>
<string name="grid_mode_showing" msgid="2803166871485028508">"Affichage en mode grille."</string>
<string name="list_mode_showing" msgid="1225413902295895166">"Affichage en mode liste."</string>
</resources>
diff --git a/res/values-is/strings.xml b/res/values-is/strings.xml
index 70a862315..676c483d4 100644
--- a/res/values-is/strings.xml
+++ b/res/values-is/strings.xml
@@ -283,7 +283,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"Búa til nýja möppu"</string>
<string name="search_bar_hint" msgid="146031513183888721">"Leita í þessu tæki"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Eyða leitarferli <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"Persónulegt"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"Einkasnið"</string>
<string name="work_tab" msgid="7265359366883747413">"Vinna"</string>
<string name="a11y_work" msgid="7504431382825242153">"Vinna"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"Ekki er hægt að færa skrár úr öðru forriti."</string>
diff --git a/res/values-it/inspector_strings.xml b/res/values-it/inspector_strings.xml
index 7e81318db..d86da2ecd 100644
--- a/res/values-it/inspector_strings.xml
+++ b/res/values-it/inspector_strings.xml
@@ -43,5 +43,5 @@
<string name="metadata_artist" msgid="8972421485694988540">"Artista"</string>
<string name="metadata_composer" msgid="4696926808308256056">"Compositore"</string>
<string name="metadata_album" msgid="1661699531214720236">"Album"</string>
- <string name="metadata_address" msgid="1849921023707744640">"Geolocalizzazione"</string>
+ <string name="metadata_address" msgid="1849921023707744640">"Posizione"</string>
</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 2feb022b6..45631faaa 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -131,9 +131,9 @@
<string name="delete_notification_title" msgid="2512757431856830792">"Eliminazione dei file"</string>
<string name="copy_remaining" msgid="5390517377265177727">"<xliff:g id="DURATION">%s</xliff:g> rimanenti"</string>
<plurals name="copy_begin" formatted="false" msgid="151184708996738192">
- <item quantity="many">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="other">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="one">Copia di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
+ <item quantity="many">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi in corso.</item>
+ <item quantity="other">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi in corso.</item>
+ <item quantity="one">Copia di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento in corso.</item>
</plurals>
<plurals name="compress_begin" formatted="false" msgid="3534158317098678895">
<item quantity="many">Compressione di <xliff:g id="COUNT_1">%1$d</xliff:g> file in corso.</item>
@@ -141,19 +141,19 @@
<item quantity="one">Compressione di <xliff:g id="COUNT_0">%1$d</xliff:g> file in corso.</item>
</plurals>
<plurals name="extract_begin" formatted="false" msgid="1006380679562903749">
- <item quantity="many">Estrazione di <xliff:g id="COUNT_1">%1$d</xliff:g> file in corso.</item>
+ <item quantity="many">Estrazione di <xliff:g id="COUNT_1">%1$d</xliff:g> di file in corso.</item>
<item quantity="other">Estrazione di <xliff:g id="COUNT_1">%1$d</xliff:g> file in corso.</item>
<item quantity="one">Estrazione di <xliff:g id="COUNT_0">%1$d</xliff:g> file in corso.</item>
</plurals>
<plurals name="move_begin" formatted="false" msgid="1464229874265756956">
- <item quantity="many">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="other">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="one">Spostamento di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
+ <item quantity="many">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi in corso.</item>
+ <item quantity="other">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi in corso.</item>
+ <item quantity="one">Spostamento di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento in corso.</item>
</plurals>
<plurals name="deleting" formatted="false" msgid="1729138001178158901">
- <item quantity="many">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="other">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi.</item>
- <item quantity="one">Eliminazione di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento.</item>
+ <item quantity="many">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi in corso.</item>
+ <item quantity="other">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi in corso.</item>
+ <item quantity="one">Eliminazione di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento in corso.</item>
</plurals>
<string name="undo" msgid="2902438994196400565">"Annulla"</string>
<string name="copy_preparing" msgid="4759516490222449324">"Preparazione…"</string>
@@ -163,24 +163,24 @@
<string name="delete_preparing" msgid="7339349837842802508">"Preparazione…"</string>
<string name="delete_progress" msgid="2627631054702306423">"<xliff:g id="COUNT_0">%1$d</xliff:g>/<xliff:g id="TOTALCOUNT">%2$d</xliff:g>"</string>
<plurals name="copy_error_notification_title" formatted="false" msgid="3188432450429390963">
- <item quantity="many">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscita</item>
- <item quantity="other">Copia di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscita</item>
- <item quantity="one">Copia di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento non riuscita</item>
+ <item quantity="many">Impossibile copiare <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi</item>
+ <item quantity="other">Impossibile copiare <xliff:g id="COUNT_1">%1$d</xliff:g> elementi</item>
+ <item quantity="one">Impossibile copiare <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<plurals name="compress_error_notification_title" formatted="false" msgid="3043630066678213644">
- <item quantity="many">Impossibile comprimere <xliff:g id="COUNT_1">%1$d</xliff:g> file</item>
+ <item quantity="many">Impossibile comprimere <xliff:g id="COUNT_1">%1$d</xliff:g> di file</item>
<item quantity="other">Impossibile comprimere <xliff:g id="COUNT_1">%1$d</xliff:g> file</item>
<item quantity="one">Impossibile comprimere <xliff:g id="COUNT_0">%1$d</xliff:g> file</item>
</plurals>
<plurals name="move_error_notification_title" formatted="false" msgid="2185736082411854754">
- <item quantity="many">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscito</item>
- <item quantity="other">Spostamento di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscito</item>
- <item quantity="one">Spostamento di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento non riuscito</item>
+ <item quantity="many">Impossibile spostare <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi</item>
+ <item quantity="other">Impossibile spostare <xliff:g id="COUNT_1">%1$d</xliff:g> elementi</item>
+ <item quantity="one">Impossibile spostare <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<plurals name="delete_error_notification_title" formatted="false" msgid="7568122018481625267">
- <item quantity="many">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscita</item>
- <item quantity="other">Eliminazione di <xliff:g id="COUNT_1">%1$d</xliff:g> elementi non riuscita</item>
- <item quantity="one">Eliminazione di <xliff:g id="COUNT_0">%1$d</xliff:g> elemento non riuscita</item>
+ <item quantity="many">Impossibile eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi</item>
+ <item quantity="other">Impossibile eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> elementi</item>
+ <item quantity="one">Impossibile eliminare <xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<string name="notification_touch_for_details" msgid="2385563502445129570">"Tocca per vedere i dettagli"</string>
<string name="close" msgid="905969391788869975">"Chiudi"</string>
@@ -200,9 +200,9 @@
<item quantity="one">Il seguente file non è stato estratto: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="move_failure_alert_content" formatted="false" msgid="2747390342670799196">
- <item quantity="many">I seguenti file non sono stati spostati: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="other">I seguenti file non sono stati spostati: <xliff:g id="LIST_1">%1$s</xliff:g></item>
- <item quantity="one">Il seguente file non è stato spostato: <xliff:g id="LIST_0">%1$s</xliff:g></item>
+ <item quantity="many">Questi file non sono stati spostati: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="other">Questi file non sono stati spostati: <xliff:g id="LIST_1">%1$s</xliff:g></item>
+ <item quantity="one">Questo file non è stato spostato: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="delete_failure_alert_content" formatted="false" msgid="6122372614839711711">
<item quantity="many">I seguenti file non sono stati eliminati: <xliff:g id="LIST_1">%1$s</xliff:g></item>
@@ -215,7 +215,7 @@
<item quantity="one">Il seguente file è stato convertito in un altro formato: <xliff:g id="LIST_0">%1$s</xliff:g></item>
</plurals>
<plurals name="clipboard_files_clipped" formatted="false" msgid="4847061634862926902">
- <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi copiati negli appunti.</item>
+ <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> di elementi copiati negli appunti.</item>
<item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi copiati negli appunti.</item>
<item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> elemento copiato negli appunti.</item>
</plurals>
@@ -230,29 +230,29 @@
<string name="allow" msgid="1275746941353040309">"Consenti"</string>
<string name="deny" msgid="5127201668078153379">"Rifiuta"</string>
<plurals name="elements_selected" formatted="false" msgid="4448165978637163692">
- <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi selezionati</item>
- <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi selezionati</item>
- <item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> elemento selezionato</item>
+ <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> selezionati</item>
+ <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> selezionati</item>
+ <item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> selezionato</item>
</plurals>
<plurals name="elements_dragged" formatted="false" msgid="5932571296037626279">
- <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi</item>
+ <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> di elementi</item>
<item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi</item>
<item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> elemento</item>
</plurals>
<string name="delete_filename_confirmation_message" msgid="8338069763240613258">"Eliminare \"<xliff:g id="NAME">%1$s</xliff:g>\"?"</string>
<string name="delete_foldername_confirmation_message" msgid="9084085260877704140">"Eliminare la cartella \"<xliff:g id="NAME">%1$s</xliff:g>\" e i relativi contenuti?"</string>
<plurals name="delete_files_confirmation_message" formatted="false" msgid="4866664063250034142">
- <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> file?</item>
+ <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> di file?</item>
<item quantity="other">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> file?</item>
<item quantity="one">Eliminare <xliff:g id="COUNT_0">%1$d</xliff:g> file?</item>
</plurals>
<plurals name="delete_folders_confirmation_message" formatted="false" msgid="1028946402799686388">
- <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> cartelle e i relativi contenuti?</item>
- <item quantity="other">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> cartelle e i relativi contenuti?</item>
- <item quantity="one">Eliminare <xliff:g id="COUNT_0">%1$d</xliff:g> cartella e i relativi contenuti?</item>
+ <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> di cartelle e i loro contenuti?</item>
+ <item quantity="other">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> cartelle e i loro contenuti?</item>
+ <item quantity="one">Eliminare <xliff:g id="COUNT_0">%1$d</xliff:g> cartella e i suoi contenuti?</item>
</plurals>
<plurals name="delete_items_confirmation_message" formatted="false" msgid="7285090426511028179">
- <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> elementi?</item>
+ <item quantity="many">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> di elementi?</item>
<item quantity="other">Eliminare <xliff:g id="COUNT_1">%1$d</xliff:g> elementi?</item>
<item quantity="one">Eliminare <xliff:g id="COUNT_0">%1$d</xliff:g> elemento?</item>
</plurals>
@@ -266,9 +266,9 @@
<string name="overwrite_file_confirmation_message" msgid="2496109652768222716">"Sovrascrivere <xliff:g id="NAME">%1$s</xliff:g>?"</string>
<string name="continue_in_background" msgid="1974214559047793331">"Continua in background"</string>
<plurals name="selected_count" formatted="false" msgid="7555250236512981129">
- <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi selezionati</item>
- <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> elementi selezionati</item>
- <item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> elemento selezionato</item>
+ <item quantity="many"><xliff:g id="COUNT_1">%1$d</xliff:g> di selezionati</item>
+ <item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g> selezionati</item>
+ <item quantity="one"><xliff:g id="COUNT_0">%1$d</xliff:g> selezionato</item>
</plurals>
<string name="root_info_header_recent" msgid="5654901877295332262">"File recenti"</string>
<string name="root_info_header_global_search" msgid="4904078222280496152">"File"</string>
diff --git a/res/values-kn/strings.xml b/res/values-kn/strings.xml
index 988be21d2..8049b2248 100644
--- a/res/values-kn/strings.xml
+++ b/res/values-kn/strings.xml
@@ -174,7 +174,7 @@
<item quantity="other"><xliff:g id="COUNT_1">%1$d</xliff:g>ಐಟಂಗಳನ್ನು ಅಳಿಸಲಾಗಲಿಲ್ಲ</item>
</plurals>
<string name="notification_touch_for_details" msgid="2385563502445129570">"ವಿವರಗಳನ್ನು ವೀಕ್ಷಿಸಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
- <string name="close" msgid="905969391788869975">"ಮುಚ್ಚು"</string>
+ <string name="close" msgid="905969391788869975">"ಮುಚ್ಚಿ"</string>
<plurals name="copy_failure_alert_content" formatted="false" msgid="5570549471912990536">
<item quantity="one">ಈ ಫೈಲ್‌ಗಳನ್ನು ನಕಲು ಮಾಡಿರಲಿಲ್ಲ: <xliff:g id="LIST_1">%1$s</xliff:g></item>
<item quantity="other">ಈ ಫೈಲ್‌ಗಳನ್ನು ನಕಲು ಮಾಡಿರಲಿಲ್ಲ: <xliff:g id="LIST_1">%1$s</xliff:g></item>
diff --git a/res/values-mk/inspector_strings.xml b/res/values-mk/inspector_strings.xml
index 9687d1d5f..72c6f9c90 100644
--- a/res/values-mk/inspector_strings.xml
+++ b/res/values-mk/inspector_strings.xml
@@ -37,7 +37,7 @@
<string name="metadata_duration" msgid="3115494422055472715">"Времетраење"</string>
<string name="metadata_date_time" msgid="1090351199248114406">"Фотографирано на"</string>
<string name="metadata_focal_length" msgid="3440735161407699893">"Фокусна должина"</string>
- <string name="metadata_focal_format" msgid="8542211707962355623">"<xliff:g id="LENGTH">%1$.2f </xliff:g> мм"</string>
+ <string name="metadata_focal_format" msgid="8542211707962355623">"<xliff:g id="LENGTH">%1$.2f </xliff:g> mm"</string>
<string name="metadata_iso_speed_ratings" msgid="1699781252899759058">"Еквивалент на ISO"</string>
<string name="metadata_iso_format" msgid="4153285204012694861">"ISO <xliff:g id="ISO_SPEED">%1$d</xliff:g>"</string>
<string name="metadata_artist" msgid="8972421485694988540">"Изведувач"</string>
diff --git a/res/values-mk/strings.xml b/res/values-mk/strings.xml
index 6049c02b7..3c6765192 100644
--- a/res/values-mk/strings.xml
+++ b/res/values-mk/strings.xml
@@ -283,7 +283,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"Создај нова папка"</string>
<string name="search_bar_hint" msgid="146031513183888721">"Пребарајте го уредов"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Избришете ја историјата на пребарување <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"Личен"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"Лично"</string>
<string name="work_tab" msgid="7265359366883747413">"Работен"</string>
<string name="a11y_work" msgid="7504431382825242153">"Работен профил"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"Не може да преместувате датотеки од друга апликација."</string>
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
index 143b3e693..9874d8a4c 100644
--- a/res/values-night/colors.xml
+++ b/res/values-night/colors.xml
@@ -35,4 +35,6 @@
<color name="list_item_selected_background_color">?android:colorSecondary</color>
<color name="fragment_pick_active_text_color">#202124</color> <!-- Grey 900 -->
+
+ <color name="search_chip_text_selected_color">@android:color/black</color>
</resources>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 13324212b..b3bb84146 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -305,7 +305,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"Creează un dosar nou"</string>
<string name="search_bar_hint" msgid="146031513183888721">"Caută acest dispozitiv"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Șterge istoricul căutărilor <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"Personale"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"Personal"</string>
<string name="work_tab" msgid="7265359366883747413">"Serviciu"</string>
<string name="a11y_work" msgid="7504431382825242153">"Serviciu"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"Nu poți muta fișiere din altă aplicație."</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index b1d368de6..cedb653d5 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -327,7 +327,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"Новая папка"</string>
<string name="search_bar_hint" msgid="146031513183888721">"Поиск на устройстве"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Очистить историю поиска: <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"Личное"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"Личный"</string>
<string name="work_tab" msgid="7265359366883747413">"Рабочее"</string>
<string name="a11y_work" msgid="7504431382825242153">"Работа"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"Перемещать файлы из другого приложения нельзя."</string>
diff --git a/res/values-si/strings.xml b/res/values-si/strings.xml
index b7297d39d..3c2b2429e 100644
--- a/res/values-si/strings.xml
+++ b/res/values-si/strings.xml
@@ -283,7 +283,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"නව ෆෝල්ඩරය තනන්න"</string>
<string name="search_bar_hint" msgid="146031513183888721">"මෙම උපාංගය සොයන්න"</string>
<string name="delete_search_history" msgid="2202015025607694515">"සෙවීම් ඉතිහාසය මකන්න <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"පෞද්ගලික"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"පුද්ගලික"</string>
<string name="work_tab" msgid="7265359366883747413">"කාර්යාල"</string>
<string name="a11y_work" msgid="7504431382825242153">"කාර්යාල"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"ඔබට වෙනත් යෙදුමකින් ගොනු ගෙන ඒමට නොහැකිය."</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 0c40de079..2dcc91983 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -286,7 +286,7 @@
<string name="root_info_header_image_app_with_summary" msgid="6404842960923224778">"Слике из: <xliff:g id="LABEL">%1$s</xliff:g>/<xliff:g id="SUMMARY">%2$s</xliff:g>"</string>
<string name="chip_title_images" msgid="7838299046109841015">"Слике"</string>
<string name="chip_title_audio" msgid="1032801828748235436">"Звук"</string>
- <string name="chip_title_videos" msgid="7011260091979776447">"Видео снимци"</string>
+ <string name="chip_title_videos" msgid="7011260091979776447">"Видеи"</string>
<string name="chip_title_documents" msgid="7432457563000753983">"Документи"</string>
<string name="chip_title_large_files" msgid="7740269190493883980">"Велике датотеке"</string>
<string name="chip_title_from_this_week" msgid="4961536405220379672">"Ове недеље"</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 9a72708a8..ef50163e9 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -283,7 +283,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"Skapa ny mapp"</string>
<string name="search_bar_hint" msgid="146031513183888721">"Sök på den här enheten"</string>
<string name="delete_search_history" msgid="2202015025607694515">"Radera sökhistorik – <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"Privat"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"Personlig"</string>
<string name="work_tab" msgid="7265359366883747413">"Jobb"</string>
<string name="a11y_work" msgid="7504431382825242153">"Jobb"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"Du kan inte flytta filer från en annan app."</string>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index 14973e6d5..aff5a7337 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -24,7 +24,7 @@
<skip />
<!-- no translation found for launcher_label (799410258349837668) -->
<skip />
- <string name="title_open" msgid="3165686459158020921">"ఇక్కడి నుండి తెరువు"</string>
+ <string name="title_open" msgid="3165686459158020921">"ఫోల్డర్ లొకేషన్‌ను ఎంచుకోండి"</string>
<string name="title_save" msgid="4384490653102710025">"ఇందులో సేవ్ చేయండి"</string>
<string name="menu_create_dir" msgid="2413624798689091042">"కొత్త ఫోల్డర్"</string>
<string name="menu_grid" msgid="1453636521731880680">"గ్రిడ్ వీక్షణ"</string>
@@ -86,7 +86,7 @@
<string name="directory_items" msgid="6645621978998614003">"అంశాల సంఖ్య"</string>
<string name="sort_direction_ascending" msgid="5882787683763248102">"ఆరోహణ"</string>
<string name="sort_direction_descending" msgid="1729187589765894076">"అవరోహణ"</string>
- <string name="open_external_app" msgid="7107920381038980086">"<xliff:g id="APPNAME">%1$s</xliff:g>ని తెరువు"</string>
+ <string name="open_external_app" msgid="7107920381038980086">"<xliff:g id="APPNAME">%1$s</xliff:g>‌ను తెరవండి"</string>
<string name="drawer_open" msgid="8071673398187261741">"మూలాలను చూపు"</string>
<string name="drawer_close" msgid="4263880768630848848">"మూలాలను దాచు"</string>
<string name="save_error" msgid="8631128801982095782">"డాక్యుమెంట్‌ను సేవ్ చేయడంలో విఫలమైంది"</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index dc01833cb..b33809db7 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -283,7 +283,7 @@
<string name="create_new_folder_button" msgid="8859613309559794890">"สร้างโฟลเดอร์ใหม่"</string>
<string name="search_bar_hint" msgid="146031513183888721">"ค้นหาอุปกรณ์นี้"</string>
<string name="delete_search_history" msgid="2202015025607694515">"ลบประวัติการค้นหา <xliff:g id="TEXT">%1$s</xliff:g>"</string>
- <string name="personal_tab" msgid="3878576287868528503">"ส่วนตัว"</string>
+ <string name="personal_tab" msgid="3878576287868528503">"ส่วนบุคคล"</string>
<string name="work_tab" msgid="7265359366883747413">"งาน"</string>
<string name="a11y_work" msgid="7504431382825242153">"งาน"</string>
<string name="drag_from_another_app" msgid="8310249276199969905">"คุณย้ายไฟล์จากแอปอื่นไม่ได้"</string>
diff --git a/res/values-v31/dimens.xml b/res/values-v31/dimens.xml
index 79b300541..a4e39319a 100644
--- a/res/values-v31/dimens.xml
+++ b/res/values-v31/dimens.xml
@@ -18,7 +18,7 @@
<dimen name="action_bar_margin">0dp</dimen>
<dimen name="button_corner_radius">20dp</dimen>
<dimen name="tab_selector_indicator_height">0dp</dimen>
- <dimen name="tab_height">36dp</dimen>
+ <dimen name="tab_height">48dp</dimen>
<dimen name="tab_container_height">48dp</dimen>
<dimen name="profile_tab_padding">20dp</dimen>
<dimen name="profile_tab_margin_top">16dp</dimen>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 12b8762aa..6ccaa6faf 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -67,4 +67,6 @@
<color name="fragment_pick_inactive_text_color">#5F6368</color>
<color name="fragment_pick_active_button_color">@color/primary</color>
<color name="fragment_pick_active_text_color">@android:color/white</color>
+
+ <color name="search_chip_text_selected_color">@android:color/white</color>
</resources>
diff --git a/src/com/android/documentsui/BaseActivity.java b/src/com/android/documentsui/BaseActivity.java
index 9e38303e1..a1dc0b99b 100644
--- a/src/com/android/documentsui/BaseActivity.java
+++ b/src/com/android/documentsui/BaseActivity.java
@@ -75,6 +75,7 @@ import com.android.documentsui.roots.ProvidersCache;
import com.android.documentsui.sidebar.RootsFragment;
import com.android.documentsui.sorting.SortController;
import com.android.documentsui.sorting.SortModel;
+import com.android.modules.utils.build.SdkLevel;
import com.google.android.material.appbar.AppBarLayout;
@@ -307,7 +308,7 @@ public abstract class BaseActivity
// If private space feature flag is enabled, we should store the intent that launched docsUi
// so that we can use this intent to get CrossProfileResolveInfo when ever we want to,
// for example when ACTION_PROFILE_AVAILABLE intent is received
- if (mUserManagerState != null) {
+ if (mUserManagerState != null && SdkLevel.isAtLeastS()) {
mUserManagerState.setCurrentStateIntent(intent);
}
mSearchManager = new SearchViewManager(searchListener, queryInterceptor,
@@ -376,6 +377,7 @@ public abstract class BaseActivity
// Base classes must update result in their onCreate.
setResult(AppCompatActivity.RESULT_CANCELED);
+ updateRecentsSetting();
}
private NavigationViewManager getNavigationViewManager(Breadcrumb breadcrumb,
@@ -454,7 +456,6 @@ public abstract class BaseActivity
mPreferencesMonitor.stop();
mSortController.destroy();
DocumentsApplication.invalidateUserManagerState(this);
- DocumentsApplication.invalidateConfigStore();
super.onDestroy();
}
@@ -1046,4 +1047,28 @@ public abstract class BaseActivity
*/
void onDirectoryLoaded(@Nullable Uri uri);
}
+
+ /**
+ * Updates the Recents preview settings based on presence of hidden profiles. Used not to leak
+ * Private profile existence when it was locked after the app was moved to the Recents.
+ */
+ public void updateRecentsSetting() {
+ if (!SdkLevel.isAtLeastV()) {
+ return;
+ }
+
+ if (mUserManagerState == null) {
+ Log.e(TAG, "Can't update Recents screenshot setting: User manager state is null.");
+ return;
+ }
+
+ if (DEBUG) {
+ Log.d(
+ TAG,
+ "Set recents screenshot to "
+ + (!mUserManagerState.areHiddenInQuietModeProfilesPresent() ? "enabled"
+ : "disabled"));
+ }
+ setRecentsScreenshotEnabled(!mUserManagerState.areHiddenInQuietModeProfilesPresent());
+ }
}
diff --git a/src/com/android/documentsui/ConfigStore.java b/src/com/android/documentsui/ConfigStore.java
index 09255c79d..49dac511c 100644
--- a/src/com/android/documentsui/ConfigStore.java
+++ b/src/com/android/documentsui/ConfigStore.java
@@ -16,22 +16,10 @@
package com.android.documentsui;
-import android.os.Binder;
-import android.provider.DeviceConfig;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.VisibleForTesting;
-
import com.android.modules.utils.build.SdkLevel;
-import com.google.common.base.Supplier;
-
public interface ConfigStore {
- // TODO(b/288066342): Remove and replace after new constant definition in
- // {@link android.provider.DeviceConfig}.
- String NAMESPACE_MEDIAPROVIDER = "mediaprovider";
-
- boolean DEFAULT_PICKER_PRIVATE_SPACE_ENABLED = false;
+ boolean DEFAULT_PICKER_PRIVATE_SPACE_ENABLED = true;
/**
* @return if the Private-Space-in-DocsUI is enabled
@@ -45,41 +33,10 @@ public interface ConfigStore {
* {@link android.provider.DeviceConfig}. Meant to be used by the "production" code.
*/
class ConfigStoreImpl implements ConfigStore {
- @VisibleForTesting
- public static final String KEY_PRIVATE_SPACE_FEATURE_ENABLED =
- "private_space_feature_enabled";
-
- private static final boolean sCanReadDeviceConfig = SdkLevel.isAtLeastS();
-
- private Boolean mIsPrivateSpaceEnabled = null;
-
@Override
public boolean isPrivateSpaceInDocsUIEnabled() {
- if (mIsPrivateSpaceEnabled == null) {
- mIsPrivateSpaceEnabled = getBooleanDeviceConfig(
- NAMESPACE_MEDIAPROVIDER,
- KEY_PRIVATE_SPACE_FEATURE_ENABLED,
- DEFAULT_PICKER_PRIVATE_SPACE_ENABLED);
- }
- return sCanReadDeviceConfig && mIsPrivateSpaceEnabled;
+ return SdkLevel.isAtLeastS();
}
- private static boolean getBooleanDeviceConfig(@NonNull String namespace,
- @NonNull String key, boolean defaultValue) {
- if (!sCanReadDeviceConfig) {
- return defaultValue;
- }
- return withCleanCallingIdentity(
- () -> DeviceConfig.getBoolean(namespace, key, defaultValue));
- }
-
- private static <T> T withCleanCallingIdentity(@NonNull Supplier<T> action) {
- final long callingIdentity = Binder.clearCallingIdentity();
- try {
- return action.get();
- } finally {
- Binder.restoreCallingIdentity(callingIdentity);
- }
- }
}
}
diff --git a/src/com/android/documentsui/DirectoryLoader.java b/src/com/android/documentsui/DirectoryLoader.java
index 870e998fb..15b3ce5e5 100644
--- a/src/com/android/documentsui/DirectoryLoader.java
+++ b/src/com/android/documentsui/DirectoryLoader.java
@@ -48,6 +48,7 @@ import com.android.documentsui.base.State;
import com.android.documentsui.base.UserId;
import com.android.documentsui.roots.RootCursorWrapper;
import com.android.documentsui.sorting.SortModel;
+import com.android.modules.utils.build.SdkLevel;
import java.util.ArrayList;
import java.util.List;
@@ -331,7 +332,7 @@ public class DirectoryLoader extends AsyncTaskLoader<DirectoryResult> {
}
private List<UserId> getUserIds() {
- if (mState.configStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mState.configStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
return DocumentsApplication.getUserManagerState(getContext()).getUserIds();
}
return DocumentsApplication.getUserIdManager(getContext()).getUserIds();
diff --git a/src/com/android/documentsui/DocumentsApplication.java b/src/com/android/documentsui/DocumentsApplication.java
index 84e4754c8..ffaa5d740 100644
--- a/src/com/android/documentsui/DocumentsApplication.java
+++ b/src/com/android/documentsui/DocumentsApplication.java
@@ -127,7 +127,8 @@ public class DocumentsApplication extends Application {
public static UserManagerState getUserManagerState(Context context) {
UserManagerState userManagerState =
((DocumentsApplication) context.getApplicationContext()).mUserManagerState;
- if (userManagerState == null && getConfigStore().isPrivateSpaceInDocsUIEnabled()) {
+ if (userManagerState == null && getConfigStore().isPrivateSpaceInDocsUIEnabled()
+ && SdkLevel.isAtLeastS()) {
userManagerState = UserManagerState.create(context);
((DocumentsApplication) context.getApplicationContext()).mUserManagerState =
userManagerState;
@@ -161,16 +162,6 @@ public class DocumentsApplication extends Application {
((DocumentsApplication) context.getApplicationContext()).mUserManagerState = null;
}
- /**
- * Set {@link #sConfigStore} as null onDestroy of BaseActivity so that new session uses new
- * instance of {@link #sConfigStore}
- */
- public static void invalidateConfigStore() {
- synchronized (DocumentsApplication.class) {
- sConfigStore = null;
- }
- }
-
private void onApplyOverlayFinish(boolean result) {
Log.d(TAG, "OverlayManager.setEnabled() result: " + result);
}
@@ -264,7 +255,7 @@ public class DocumentsApplication extends Application {
} else if (PROFILE_FILTER_ACTIONS.contains(action)) {
// Make the changes to UserManagerState object before calling providers updateAsync
// so that providers for all the users are loaded
- if (getConfigStore().isPrivateSpaceInDocsUIEnabled()) {
+ if (getConfigStore().isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastV()) {
UserHandle userHandle = intent.getParcelableExtra(Intent.EXTRA_USER);
UserId userId = UserId.of(userHandle);
getUserManagerState(context).onProfileActionStatusChange(action, userId);
diff --git a/src/com/android/documentsui/ProfileTabs.java b/src/com/android/documentsui/ProfileTabs.java
index b692c7ada..df525d527 100644
--- a/src/com/android/documentsui/ProfileTabs.java
+++ b/src/com/android/documentsui/ProfileTabs.java
@@ -180,7 +180,7 @@ public class ProfileTabs implements ProfileTabsAddons {
mUserIds.addAll(userIds);
mTabs.removeAllTabs();
if (mUserIds.size() > 1) {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
addTabsPrivateSpaceEnabled();
} else {
addTabsPrivateSpaceDisabled();
@@ -190,7 +190,7 @@ public class ProfileTabs implements ProfileTabsAddons {
}
private List<UserId> getUserIds() {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
assert mUserManagerState != null;
return mUserManagerState.getUserIds();
}
@@ -198,6 +198,7 @@ public class ProfileTabs implements ProfileTabsAddons {
return mUserIdManager.getUserIds();
}
+ @RequiresApi(Build.VERSION_CODES.S)
private void addTabsPrivateSpaceEnabled() {
// set setSelected to false otherwise it will trigger callback.
assert mUserManagerState != null;
diff --git a/src/com/android/documentsui/UserManagerState.java b/src/com/android/documentsui/UserManagerState.java
index eccc6b00c..b1c1a0d59 100644
--- a/src/com/android/documentsui/UserManagerState.java
+++ b/src/com/android/documentsui/UserManagerState.java
@@ -57,6 +57,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+@RequiresApi(Build.VERSION_CODES.S)
public interface UserManagerState {
/**
@@ -89,8 +90,9 @@ public interface UserManagerState {
* received in broadcast
*
* @param userId {@link UserId} for the profile for which the availability status changed
- * @param action {@link Intent}.ACTION_PROFILE_UNAVAILABLE or
- * {@link Intent}.ACTION_PROFILE_AVAILABLE
+ * @param action {@link Intent}.ACTION_PROFILE_UNAVAILABLE and {@link
+ * Intent}.ACTION_PROFILE_AVAILABLE, {@link Intent}.ACTION_PROFILE_ADDED} and {@link
+ * Intent}.ACTION_PROFILE_REMOVED}
*/
void onProfileActionStatusChange(String action, UserId userId);
@@ -99,6 +101,9 @@ public interface UserManagerState {
*/
void setCurrentStateIntent(Intent intent);
+ /** Returns true if there are hidden profiles */
+ boolean areHiddenInQuietModeProfilesPresent();
+
/**
* Creates an implementation of {@link UserManagerState}.
*/
@@ -230,16 +235,19 @@ public interface UserManagerState {
@Override
@SuppressLint("NewApi")
public void onProfileActionStatusChange(String action, UserId userId) {
+ if (!SdkLevel.isAtLeastV()) return;
UserProperties userProperties = mUserManager.getUserProperties(
UserHandle.of(userId.getIdentifier()));
if (userProperties.getShowInQuietMode() != UserProperties.SHOW_IN_QUIET_MODE_HIDDEN) {
return;
}
- if (Intent.ACTION_PROFILE_UNAVAILABLE.equals(action)) {
+ if (Intent.ACTION_PROFILE_UNAVAILABLE.equals(action)
+ || Intent.ACTION_PROFILE_REMOVED.equals(action)) {
synchronized (mUserIds) {
mUserIds.remove(userId);
}
- } else if (Intent.ACTION_PROFILE_AVAILABLE.equals(action)) {
+ } else if (Intent.ACTION_PROFILE_AVAILABLE.equals(action)
+ || Intent.ACTION_PROFILE_ADDED.equals(action)) {
synchronized (mUserIds) {
if (!mUserIds.contains(userId)) {
mUserIds.add(userId);
@@ -280,6 +288,23 @@ public interface UserManagerState {
mCurrentStateIntent = intent;
}
+ @Override
+ public boolean areHiddenInQuietModeProfilesPresent() {
+ if (!SdkLevel.isAtLeastV()) {
+ return false;
+ }
+
+ for (UserId userId : getUserIds()) {
+ if (mUserManager
+ .getUserProperties(UserHandle.of(userId.getIdentifier()))
+ .getShowInQuietMode()
+ == UserProperties.SHOW_IN_QUIET_MODE_HIDDEN) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private List<UserId> getUserIdsInternal() {
final List<UserId> result = new ArrayList<>();
diff --git a/src/com/android/documentsui/base/State.java b/src/com/android/documentsui/base/State.java
index 22a84fcb8..a3d0f9ddc 100644
--- a/src/com/android/documentsui/base/State.java
+++ b/src/com/android/documentsui/base/State.java
@@ -108,6 +108,9 @@ public class State implements android.os.Parcelable {
*/
public boolean canInteractWith(UserId userId) {
if (configStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (canForwardToProfileIdMap.isEmpty() && UserId.CURRENT_USER.equals(userId)) {
+ return true;
+ }
return canForwardToProfileIdMap.getOrDefault(userId, false);
}
return canShareAcrossProfile || UserId.CURRENT_USER.equals(userId);
diff --git a/src/com/android/documentsui/dirlist/AppsRowManager.java b/src/com/android/documentsui/dirlist/AppsRowManager.java
index 092d5ec32..297d1b2e3 100644
--- a/src/com/android/documentsui/dirlist/AppsRowManager.java
+++ b/src/com/android/documentsui/dirlist/AppsRowManager.java
@@ -36,6 +36,7 @@ import com.android.documentsui.dirlist.AppsRowItemData.RootData;
import com.android.documentsui.sidebar.AppItem;
import com.android.documentsui.sidebar.Item;
import com.android.documentsui.sidebar.RootItem;
+import com.android.modules.utils.build.SdkLevel;
import java.util.ArrayList;
import java.util.HashMap;
@@ -151,7 +152,7 @@ public class AppsRowManager {
}
private List<UserId> getUserIds() {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
return mUserManagerState.getUserIds();
}
return mUserIdManager.getUserIds();
diff --git a/src/com/android/documentsui/dirlist/DirectoryFragment.java b/src/com/android/documentsui/dirlist/DirectoryFragment.java
index bf54e25fd..04589552b 100644
--- a/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -262,8 +262,8 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
if (userProperties.getShowInQuietMode()
== UserProperties.SHOW_IN_QUIET_MODE_PAUSED) {
if (Objects.equal(mActivity.getSelectedUser(), userId)) {
- // We only need to refresh the layout when the selected user is equal to the
- // received profile user.
+ // We only need to refresh the layout when the selected user is equal to
+ // the received profile user.
onPausedProfileStatusChange(action, userId);
}
return;
@@ -308,6 +308,7 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
}
private void onHiddenProfileStatusChange(String action, UserId userId) {
+ mActivity.updateRecentsSetting();
if (Intent.ACTION_PROFILE_UNAVAILABLE.equals(action)) {
if (mProviderTestRunnable != null) {
mHandler.removeCallbacks(mProviderTestRunnable);
@@ -404,7 +405,9 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
private boolean isProfileStatusAction(String action) {
if (!SdkLevel.isAtLeastV()) return isManagedProfileAction(action);
return Intent.ACTION_PROFILE_AVAILABLE.equals(action)
- || Intent.ACTION_PROFILE_UNAVAILABLE.equals(action);
+ || Intent.ACTION_PROFILE_UNAVAILABLE.equals(action)
+ || Intent.ACTION_PROFILE_ADDED.equals(action)
+ || Intent.ACTION_PROFILE_REMOVED.equals(action);
}
private static boolean isManagedProfileAction(String action) {
@@ -642,6 +645,8 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
if (SdkLevel.isAtLeastV()) {
filter.addAction(Intent.ACTION_PROFILE_AVAILABLE);
filter.addAction(Intent.ACTION_PROFILE_UNAVAILABLE);
+ filter.addAction(Intent.ACTION_PROFILE_ADDED);
+ filter.addAction(Intent.ACTION_PROFILE_REMOVED);
}
// DocumentsApplication will resend the broadcast locally after roots are updated.
// Register to a local broadcast manager to avoid this fragment from updating before
@@ -652,15 +657,16 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
}
private DocumentsAdapter getModelBackedDocumentsAdapter() {
- return mState.configStore.isPrivateSpaceInDocsUIEnabled()
- ? new DirectoryAddonsAdapter(
- mAdapterEnv, new ModelBackedDocumentsAdapter(mAdapterEnv, mIconHelper,
- mInjector.fileTypeLookup, mState.configStore),
- UserId.CURRENT_USER,
- mActivity.getSelectedUser(),
- DocumentsApplication.getUserManagerState(getContext()).getUserIdToLabelMap(),
- getContext().getSystemService(UserManager.class), mState.configStore)
- : new DirectoryAddonsAdapter(
+ if (SdkLevel.isAtLeastS() && mState.configStore.isPrivateSpaceInDocsUIEnabled()) {
+ return new DirectoryAddonsAdapter(
+ mAdapterEnv, new ModelBackedDocumentsAdapter(mAdapterEnv, mIconHelper,
+ mInjector.fileTypeLookup, mState.configStore),
+ UserId.CURRENT_USER,
+ mActivity.getSelectedUser(),
+ DocumentsApplication.getUserManagerState(getContext()).getUserIdToLabelMap(),
+ getContext().getSystemService(UserManager.class), mState.configStore);
+ }
+ return new DirectoryAddonsAdapter(
mAdapterEnv,
new ModelBackedDocumentsAdapter(mAdapterEnv, mIconHelper,
mInjector.fileTypeLookup, mState.configStore),
diff --git a/src/com/android/documentsui/dirlist/DocumentHolder.java b/src/com/android/documentsui/dirlist/DocumentHolder.java
index b664bbcd4..26f527896 100644
--- a/src/com/android/documentsui/dirlist/DocumentHolder.java
+++ b/src/com/android/documentsui/dirlist/DocumentHolder.java
@@ -202,7 +202,7 @@ public abstract class DocumentHolder
protected String getPreviewIconContentDescription(boolean isNonPersonalProfile,
String fileName, UserId userId) {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
UserManagerState userManagerState = DocumentsApplication.getUserManagerState(mContext);
String profileLabel = userManagerState.getUserIdToLabelMap().get(userId);
return isNonPersonalProfile
diff --git a/src/com/android/documentsui/dirlist/GridDirectoryHolder.java b/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
index caa3ec249..7e9a32df2 100644
--- a/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
+++ b/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
@@ -54,7 +54,10 @@ final class GridDirectoryHolder extends DocumentHolder {
private final ImageView mIconBadge;
private final View mIconLayout;
- GridDirectoryHolder(Context context, ViewGroup parent, ConfigStore configStore) {
+ private final IconHelper mIconHelper;
+
+ GridDirectoryHolder(
+ Context context, ViewGroup parent, IconHelper iconHelper, ConfigStore configStore) {
super(context, parent, R.layout.item_dir_grid, configStore);
mIconLayout = itemView.findViewById(R.id.icon);
@@ -64,6 +67,7 @@ final class GridDirectoryHolder extends DocumentHolder {
mIconBadge = (ImageView) itemView.findViewById(R.id.icon_profile_badge);
mIconMime.setImageDrawable(
IconUtils.loadMimeIcon(context, DocumentsContract.Document.MIME_TYPE_DIR));
+ mIconHelper = iconHelper;
if (SdkLevel.isAtLeastT() && !mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
setUpdatableWorkProfileIcon(context);
@@ -98,12 +102,14 @@ final class GridDirectoryHolder extends DocumentHolder {
}
@Override
+ @RequiresApi(Build.VERSION_CODES.S)
public void bindProfileIcon(boolean show, int userIdIdentifier) {
Map<UserId, Drawable> userIdToBadgeMap = DocumentsApplication.getUserManagerState(
mContext).getUserIdToBadgeMap();
Drawable drawable = userIdToBadgeMap.get(UserId.of(userIdIdentifier));
mIconBadge.setImageDrawable(drawable);
mIconBadge.setVisibility(show ? View.VISIBLE : View.GONE);
+ mIconBadge.setContentDescription(mIconHelper.getProfileLabel(userIdIdentifier));
}
@Override
diff --git a/src/com/android/documentsui/dirlist/GridDocumentHolder.java b/src/com/android/documentsui/dirlist/GridDocumentHolder.java
index 981e659a8..eb35b1a5f 100644
--- a/src/com/android/documentsui/dirlist/GridDocumentHolder.java
+++ b/src/com/android/documentsui/dirlist/GridDocumentHolder.java
@@ -153,12 +153,14 @@ final class GridDocumentHolder extends DocumentHolder {
}
@Override
+ @RequiresApi(Build.VERSION_CODES.S)
public void bindProfileIcon(boolean show, int userIdIdentifier) {
Map<UserId, Drawable> userIdToBadgeMap = DocumentsApplication.getUserManagerState(
mContext).getUserIdToBadgeMap();
Drawable drawable = userIdToBadgeMap.get(UserId.of(userIdIdentifier));
mIconBadge.setImageDrawable(drawable);
mIconBadge.setVisibility(show ? View.VISIBLE : View.GONE);
+ mIconBadge.setContentDescription(mIconHelper.getProfileLabel(userIdIdentifier));
}
@Override
diff --git a/src/com/android/documentsui/dirlist/GridPhotoHolder.java b/src/com/android/documentsui/dirlist/GridPhotoHolder.java
index 8fab8529d..e86d3131f 100644
--- a/src/com/android/documentsui/dirlist/GridPhotoHolder.java
+++ b/src/com/android/documentsui/dirlist/GridPhotoHolder.java
@@ -138,6 +138,7 @@ final class GridPhotoHolder extends DocumentHolder {
}
@Override
+ @RequiresApi(Build.VERSION_CODES.S)
public void bindProfileIcon(boolean show, int userIdIdentifier) {
Map<UserId, Drawable> userIdToBadgeMap = DocumentsApplication.getUserManagerState(
mContext).getUserIdToBadgeMap();
@@ -145,6 +146,7 @@ final class GridPhotoHolder extends DocumentHolder {
ImageView icon = mIconBadge.findViewById(R.id.icon_id);
icon.setImageDrawable(drawable);
mIconBadge.setVisibility(show ? View.VISIBLE : View.GONE);
+ mIconBadge.setContentDescription(mIconHelper.getProfileLabel(userIdIdentifier));
}
@Override
@@ -193,8 +195,14 @@ final class GridPhotoHolder extends DocumentHolder {
Formatter.formatFileSize(mContext, getCursorLong(cursor, Document.COLUMN_SIZE));
final String docDate = Shared.formatTime(mContext, mDoc.lastModified);
if (mIconHelper.shouldShowBadge(mDoc.userId.getIdentifier())) {
- itemView.setContentDescription((mContext.getText(R.string.a11y_work) + ", ")
- + mDoc.displayName + ", " + docSize + ", " + docDate);
+ itemView.setContentDescription(
+ mIconHelper.getProfileLabel(mDoc.userId.getIdentifier())
+ + ", "
+ + mDoc.displayName
+ + ", "
+ + docSize
+ + ", "
+ + docDate);
} else {
itemView.setContentDescription(mDoc.displayName + ", " + docSize + ", " + docDate);
}
diff --git a/src/com/android/documentsui/dirlist/IconHelper.java b/src/com/android/documentsui/dirlist/IconHelper.java
index be86880aa..44d1d95d3 100644
--- a/src/com/android/documentsui/dirlist/IconHelper.java
+++ b/src/com/android/documentsui/dirlist/IconHelper.java
@@ -49,6 +49,7 @@ import com.android.documentsui.base.MimeTypes;
import com.android.documentsui.base.State;
import com.android.documentsui.base.State.ViewMode;
import com.android.documentsui.base.UserId;
+import com.android.modules.utils.build.SdkLevel;
import java.util.function.BiConsumer;
@@ -271,7 +272,7 @@ public class IconHelper {
* Returns true if we should show a briefcase icon for the given user.
*/
public boolean shouldShowBadge(int userIdIdentifier) {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
return mMaybeShowBadge
&& mUserManagerState.getUserIds().size() > 1
&& ActivityManager.getCurrentUser() != userIdIdentifier;
@@ -279,4 +280,13 @@ public class IconHelper {
return mMaybeShowBadge && mManagedUser != null
&& mManagedUser.getIdentifier() == userIdIdentifier;
}
+
+ /** Returns label of the profile the icon belongs to. */
+ public String getProfileLabel(int userIdIdentifier) {
+ if (SdkLevel.isAtLeastS()) {
+ return mUserManagerState.getUserIdToLabelMap().get(UserId.of(userIdIdentifier));
+ } else {
+ return "";
+ }
+ }
}
diff --git a/src/com/android/documentsui/dirlist/ListDocumentHolder.java b/src/com/android/documentsui/dirlist/ListDocumentHolder.java
index e287b76cb..2c09d3aec 100644
--- a/src/com/android/documentsui/dirlist/ListDocumentHolder.java
+++ b/src/com/android/documentsui/dirlist/ListDocumentHolder.java
@@ -174,12 +174,14 @@ final class ListDocumentHolder extends DocumentHolder {
}
@Override
+ @RequiresApi(Build.VERSION_CODES.S)
public void bindProfileIcon(boolean show, int userIdIdentifier) {
Map<UserId, Drawable> userIdToBadgeMap = DocumentsApplication.getUserManagerState(
mContext).getUserIdToBadgeMap();
Drawable drawable = userIdToBadgeMap.get(UserId.of(userIdIdentifier));
mIconBadge.setImageDrawable(drawable);
mIconBadge.setVisibility(show ? View.VISIBLE : View.GONE);
+ mIconBadge.setContentDescription(mIconHelper.getProfileLabel(userIdIdentifier));
}
@Override
diff --git a/src/com/android/documentsui/dirlist/ModelBackedDocumentsAdapter.java b/src/com/android/documentsui/dirlist/ModelBackedDocumentsAdapter.java
index beaa24b83..fc60d07a3 100644
--- a/src/com/android/documentsui/dirlist/ModelBackedDocumentsAdapter.java
+++ b/src/com/android/documentsui/dirlist/ModelBackedDocumentsAdapter.java
@@ -36,6 +36,7 @@ import com.android.documentsui.base.EventListener;
import com.android.documentsui.base.Lookup;
import com.android.documentsui.base.State;
import com.android.documentsui.roots.RootCursorWrapper;
+import com.android.modules.utils.build.SdkLevel;
import java.util.ArrayList;
import java.util.List;
@@ -94,7 +95,9 @@ final class ModelBackedDocumentsAdapter extends DocumentsAdapter {
case MODE_GRID:
switch (viewType) {
case ITEM_TYPE_DIRECTORY:
- holder = new GridDirectoryHolder(mEnv.getContext(), parent, mConfigStore);
+ holder =
+ new GridDirectoryHolder(
+ mEnv.getContext(), parent, mIconHelper, mConfigStore);
break;
case ITEM_TYPE_DOCUMENT:
holder = state.isPhotoPicking()
@@ -149,7 +152,7 @@ final class ModelBackedDocumentsAdapter extends DocumentsAdapter {
holder.setAction(mEnv.getDisplayState().action);
holder.bindPreviewIcon(mEnv.getDisplayState().shouldShowPreview() && enabled,
view -> mEnv.getActionHandler().previewItem(holder.getItemDetails()));
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
holder.bindProfileIcon(mIconHelper.shouldShowBadge(userIdIdentifier), userIdIdentifier);
} else {
holder.bindBriefcaseIcon(mIconHelper.shouldShowBadge(userIdIdentifier));
diff --git a/src/com/android/documentsui/picker/LastAccessedProvider.java b/src/com/android/documentsui/picker/LastAccessedProvider.java
index 36c00f317..3a0de08dd 100644
--- a/src/com/android/documentsui/picker/LastAccessedProvider.java
+++ b/src/com/android/documentsui/picker/LastAccessedProvider.java
@@ -57,6 +57,7 @@ public class LastAccessedProvider extends ContentProvider {
private static final int URI_LAST_ACCESSED = 1;
+ public static final String METHOD_CLOSE_DATABASE = "closeDatabase";
public static final String METHOD_PURGE = "purge";
public static final String METHOD_PURGE_PACKAGE = "purgePackage";
@@ -236,6 +237,9 @@ public class LastAccessedProvider extends ContentProvider {
return null;
+ } else if (METHOD_CLOSE_DATABASE.equals(method)) {
+ mHelper.close();
+ return null;
} else {
return super.call(method, arg, extras);
}
diff --git a/src/com/android/documentsui/picker/PickActivity.java b/src/com/android/documentsui/picker/PickActivity.java
index c14c8b8a9..e9b91b1a0 100644
--- a/src/com/android/documentsui/picker/PickActivity.java
+++ b/src/com/android/documentsui/picker/PickActivity.java
@@ -66,6 +66,7 @@ import com.android.documentsui.ui.DialogController;
import com.android.documentsui.ui.MessageBuilder;
import com.android.documentsui.util.CrossProfileUtils;
import com.android.documentsui.util.VersionUtils;
+import com.android.modules.utils.build.SdkLevel;
import java.util.Collection;
import java.util.Collections;
@@ -230,7 +231,7 @@ public class PickActivity extends BaseActivity implements ActionHandler.Addons {
moreApps.setComponent(null);
moreApps.setPackage(null);
if (mState.supportsCrossProfile) {
- if (mConfigStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (mConfigStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
mState.canForwardToProfileIdMap = mUserManagerState.getCanForwardToProfileIdMap(
moreApps);
} else if (CrossProfileUtils.getCrossProfileResolveInfo(UserId.CURRENT_USER,
diff --git a/src/com/android/documentsui/picker/PickCountRecordProvider.java b/src/com/android/documentsui/picker/PickCountRecordProvider.java
index 0a8e21505..aa98ca042 100644
--- a/src/com/android/documentsui/picker/PickCountRecordProvider.java
+++ b/src/com/android/documentsui/picker/PickCountRecordProvider.java
@@ -25,6 +25,7 @@ import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.net.Uri;
+import android.os.Bundle;
import android.util.Log;
public class PickCountRecordProvider extends ContentProvider {
@@ -40,6 +41,8 @@ public class PickCountRecordProvider extends ContentProvider {
static final String AUTHORITY = "com.android.documentsui.pickCountRecord";
+ public static final String METHOD_CLOSE_DATABASE = "closeDatabase";
+
static {
MATCHER.addURI(AUTHORITY, "pickCountRecord/*", URI_PICK_RECORD);
}
@@ -148,4 +151,14 @@ public class PickCountRecordProvider extends ContentProvider {
public String getType(Uri uri) {
return null;
}
+
+ @Override
+ public Bundle call(String method, String arg, Bundle extras) {
+ if (METHOD_CLOSE_DATABASE.equals(method)) {
+ mHelper.close();
+ return null;
+ } else {
+ return super.call(method, arg, extras);
+ }
+ }
} \ No newline at end of file
diff --git a/src/com/android/documentsui/queries/SearchHistoryManager.java b/src/com/android/documentsui/queries/SearchHistoryManager.java
index 26def876d..6ccad6a29 100644
--- a/src/com/android/documentsui/queries/SearchHistoryManager.java
+++ b/src/com/android/documentsui/queries/SearchHistoryManager.java
@@ -175,6 +175,13 @@ public class SearchHistoryManager {
}
}
+ /**
+ * Closes the database.
+ */
+ public void closeDatabase() {
+ mHelper.close();
+ }
+
private class DatabaseTask extends AsyncTask<Object, Void, Object> {
private final String mKeyword;
private final DATABASE_OPERATION mOperation;
diff --git a/src/com/android/documentsui/roots/ProvidersCache.java b/src/com/android/documentsui/roots/ProvidersCache.java
index 15089a6a5..a0e813e0a 100644
--- a/src/com/android/documentsui/roots/ProvidersCache.java
+++ b/src/com/android/documentsui/roots/ProvidersCache.java
@@ -58,6 +58,7 @@ import com.android.documentsui.base.Providers;
import com.android.documentsui.base.RootInfo;
import com.android.documentsui.base.State;
import com.android.documentsui.base.UserId;
+import com.android.modules.utils.build.SdkLevel;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
@@ -705,7 +706,8 @@ public class ProvidersCache implements ProvidersAccess, LookupApplicationName {
}
private List<UserId> getUserIds() {
- if (DocumentsApplication.getConfigStore().isPrivateSpaceInDocsUIEnabled()) {
+ if (DocumentsApplication.getConfigStore().isPrivateSpaceInDocsUIEnabled()
+ && SdkLevel.isAtLeastS()) {
return DocumentsApplication.getUserManagerState(mContext).getUserIds();
}
return DocumentsApplication.getUserIdManager(mContext).getUserIds();
diff --git a/src/com/android/documentsui/sidebar/RootsFragment.java b/src/com/android/documentsui/sidebar/RootsFragment.java
index f5be6c2ab..ee13d8617 100644
--- a/src/com/android/documentsui/sidebar/RootsFragment.java
+++ b/src/com/android/documentsui/sidebar/RootsFragment.java
@@ -27,6 +27,7 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
+import android.os.Build;
import android.os.Bundle;
import android.provider.DocumentsContract;
import android.text.TextUtils;
@@ -47,6 +48,7 @@ import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.ListView;
import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
import androidx.annotation.VisibleForTesting;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -78,6 +80,7 @@ import com.android.documentsui.roots.ProvidersAccess;
import com.android.documentsui.roots.ProvidersCache;
import com.android.documentsui.roots.RootsLoader;
import com.android.documentsui.util.CrossProfileUtils;
+import com.android.modules.utils.build.SdkLevel;
import java.util.ArrayList;
import java.util.Collection;
@@ -269,7 +272,8 @@ public class RootsFragment extends Fragment {
ResolveInfo crossProfileResolveInfo = null;
UserManagerState userManagerState = null;
if (state.supportsCrossProfile() && handlerAppIntent != null) {
- if (state.configStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (state.configStore.isPrivateSpaceInDocsUIEnabled()
+ && SdkLevel.isAtLeastS()) {
userManagerState = DocumentsApplication.getUserManagerState(getContext());
Map<UserId, Boolean> canForwardToProfileIdMap =
userManagerState.getCanForwardToProfileIdMap(handlerAppIntent);
@@ -335,7 +339,7 @@ public class RootsFragment extends Fragment {
}
private List<UserId> getUserIds() {
- if (state.configStore.isPrivateSpaceInDocsUIEnabled()) {
+ if (state.configStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) {
return DocumentsApplication.getUserManagerState(getContext()).getUserIds();
}
return DocumentsApplication.getUserIdManager(getContext()).getUserIds();
@@ -462,7 +466,7 @@ public class RootsFragment extends Fragment {
}
List<Item> presentableList =
- state.configStore.isPrivateSpaceInDocsUIEnabled()
+ state.configStore.isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()
? getPresentableListPrivateSpaceEnabled(
context, state, rootListAllUsers, userIds, userManagerState) :
getPresentableListPrivateSpaceDisabled(context, state, rootList,
@@ -471,6 +475,7 @@ public class RootsFragment extends Fragment {
return result;
}
+ @RequiresApi(Build.VERSION_CODES.S)
private List<Item> getPresentableListPrivateSpaceEnabled(Context context, State state,
List<List<Item>> rootListAllUsers, List<UserId> userIds,
UserManagerState userManagerState) {
diff --git a/tests/Android.bp b/tests/Android.bp
index 643cb4fd6..27c30acc9 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -25,7 +25,6 @@ java_defaults {
],
static_libs: [
- "DocumentsUI-lib",
"androidx.test.rules",
"androidx.test.espresso.core",
"androidx.test.ext.truth",
@@ -70,6 +69,10 @@ android_library {
"unit/**/*.java",
],
+ libs: [
+ "DocumentsUI-lib",
+ ],
+
resource_dirs: [
"res",
],
@@ -90,6 +93,10 @@ android_library {
"unit/**/*.java",
],
+ libs: [
+ "DocumentsUI-lib",
+ ],
+
asset_dirs: [
"assets",
],
diff --git a/tests/common/com/android/documentsui/TestUserManagerState.java b/tests/common/com/android/documentsui/TestUserManagerState.java
index 5f41ce3e0..b7647f65d 100644
--- a/tests/common/com/android/documentsui/TestUserManagerState.java
+++ b/tests/common/com/android/documentsui/TestUserManagerState.java
@@ -18,8 +18,11 @@ package com.android.documentsui;
import android.content.Intent;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.util.Log;
+import androidx.annotation.RequiresApi;
+
import com.android.documentsui.base.UserId;
import java.util.ArrayList;
@@ -27,6 +30,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+@RequiresApi(Build.VERSION_CODES.S)
public class TestUserManagerState implements UserManagerState {
private static final String TAG = "TestUserManagerState";
@@ -84,4 +88,9 @@ public class TestUserManagerState implements UserManagerState {
@Override
public void setCurrentStateIntent(Intent intent) {
}
+
+ @Override
+ public boolean areHiddenInQuietModeProfilesPresent() {
+ return false;
+ }
}
diff --git a/tests/functional/com/android/documentsui/FileCopyUiTest.java b/tests/functional/com/android/documentsui/FileCopyUiTest.java
index 0284c3001..65a5d257f 100644
--- a/tests/functional/com/android/documentsui/FileCopyUiTest.java
+++ b/tests/functional/com/android/documentsui/FileCopyUiTest.java
@@ -57,9 +57,9 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
/**
-* This class test the below points
-* - Copy large number of files on the internal/external storage
-*/
+ * This class test the below points
+ * - Copy large number of files on the internal/external storage
+ */
@LargeTest
public class FileCopyUiTest extends ActivityTest<FilesActivity> {
private static final String TAG = "FileCopyUiTest";
@@ -320,7 +320,7 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {
if (in != null) {
try {
in.close();
- in = null;
+ in = null;
} catch (Exception e) {
Log.d(TAG, "Error occurs when close ZipInputStream. ", e);
}
@@ -375,12 +375,12 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {
private void initStorageRootInfo() throws RemoteException {
List<RootInfo> rootList = mStorageDocsHelper.getRootList();
for (RootInfo info : rootList) {
- if (ROOT_ID_DEVICE.equals(info.rootId)) {
- mPrimaryRoot = info;
- } else if (info.isSd()) {
- mSdCardRoot = info;
- mSdCardLabel = info.title;
- }
+ if (ROOT_ID_DEVICE.equals(info.rootId)) {
+ mPrimaryRoot = info;
+ } else if (info.isSd()) {
+ mSdCardRoot = info;
+ mSdCardLabel = info.title;
+ }
}
}
@@ -489,7 +489,8 @@ public class FileCopyUiTest extends ActivityTest<FilesActivity> {
}
@HugeLongTest
- public void testRecursiveCopyDocuments_InternalStorageToDownloadsProvider() throws Exception {
+ public void ignored_testRecursiveCopyDocuments_InternalStorageToDownloadsProvider()
+ throws Exception {
// Create Download folder if it doesn't exist.
DocumentInfo info = mStorageDocsHelper.findFile(mPrimaryRoot.documentId, "Download");
diff --git a/tests/unit/com/android/documentsui/ProfileTabsTest.java b/tests/unit/com/android/documentsui/ProfileTabsTest.java
index 8eac48456..054cdd006 100644
--- a/tests/unit/com/android/documentsui/ProfileTabsTest.java
+++ b/tests/unit/com/android/documentsui/ProfileTabsTest.java
@@ -18,8 +18,6 @@ package com.android.documentsui;
import static com.google.common.truth.Truth.assertThat;
-import static org.junit.Assume.assumeTrue;
-
import android.content.Context;
import android.net.Uri;
import android.os.UserHandle;
@@ -99,12 +97,12 @@ public class ProfileTabsTest {
mTestEnv = new TestEnvironment();
mTestEnv.isSearchExpanded = false;
- isPrivateSpaceEnabled = SdkLevel.isAtLeastS() && isPrivateSpaceEnabled;
- if (isPrivateSpaceEnabled) {
+ if (isPrivateSpaceEnabled && SdkLevel.isAtLeastS()) {
mTestUserManagerState = new TestUserManagerState();
} else {
mTestUserIdManager = new TestUserIdManager();
}
+ isPrivateSpaceEnabled = SdkLevel.isAtLeastS() && isPrivateSpaceEnabled;
mTestCommonAddons = new TestCommonAddons();
mTestCommonAddons.mCurrentRoot = TestProvidersAccess.DOWNLOADS;
@@ -137,7 +135,7 @@ public class ProfileTabsTest {
@Test
public void testUpdateView_multiUsers_shouldShow() {
- assumeTrue(SdkLevel.isAtLeastV() && isPrivateSpaceEnabled);
+ if (!SdkLevel.isAtLeastV() || !isPrivateSpaceEnabled) return;
initializeWithUsers(true, mSystemUser, mManagedUser, mPrivateUser);
assertThat(mTabLayoutContainer.getVisibility()).isEqualTo(View.VISIBLE);
@@ -216,7 +214,7 @@ public class ProfileTabsTest {
assertThat(mTabLayoutContainer.getVisibility()).isEqualTo(View.VISIBLE);
assertThat(mProfileTabs.getSelectedUser()).isEqualTo(mManagedUser);
- if (isPrivateSpaceEnabled) {
+ if (SdkLevel.isAtLeastS() && isPrivateSpaceEnabled) {
mTestUserManagerState.userIds = Lists.newArrayList(mSystemUser);
} else {
mTestUserIdManager.userIds = Lists.newArrayList(mSystemUser);
@@ -245,7 +243,7 @@ public class ProfileTabsTest {
@Test
public void testUpdateView_afterCurrentRootChangedMultiUser_shouldChangeSelectedUser() {
- assumeTrue(SdkLevel.isAtLeastV() && isPrivateSpaceEnabled);
+ if (!SdkLevel.isAtLeastV() || !isPrivateSpaceEnabled) return;
initializeWithUsers(true, mSystemUser, mManagedUser, mPrivateUser);
mProfileTabs.updateView();
@@ -266,7 +264,7 @@ public class ProfileTabsTest {
@Test
public void testUpdateView_afterSelectedUserBecomesUnavailable_shouldSwitchToCurrentUser() {
// here current user refers to UserId.CURRENT_USER, which in this case will be mSystemUser
- assumeTrue(SdkLevel.isAtLeastV() && isPrivateSpaceEnabled);
+ if (!SdkLevel.isAtLeastS() || !isPrivateSpaceEnabled) return;
initializeWithUsers(true, mSystemUser, mManagedUser, mPrivateUser);
mTabLayout.selectTab(mTabLayout.getTabAt(2));
@@ -293,7 +291,7 @@ public class ProfileTabsTest {
@Test
public void testGetSelectedUser_multiUsers() {
- assumeTrue(SdkLevel.isAtLeastV() && isPrivateSpaceEnabled);
+ if (!SdkLevel.isAtLeastV() || !isPrivateSpaceEnabled) return;
initializeWithUsers(true, mSystemUser, mManagedUser, mPrivateUser);
List<UserId> expectedProfiles = Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser);
@@ -326,7 +324,7 @@ public class ProfileTabsTest {
}
private void initializeWithUsers(boolean isPrivateSpaceEnabled, UserId... userIds) {
- if (isPrivateSpaceEnabled) {
+ if (SdkLevel.isAtLeastS() && isPrivateSpaceEnabled) {
mTestConfigStore.enablePrivateSpaceInPhotoPicker();
mTestUserManagerState.userIds = Lists.newArrayList(userIds);
for (UserId userId : userIds) {
diff --git a/tests/unit/com/android/documentsui/UserManagerStateTest.java b/tests/unit/com/android/documentsui/UserManagerStateTest.java
index afe8f4564..42822d8e2 100644
--- a/tests/unit/com/android/documentsui/UserManagerStateTest.java
+++ b/tests/unit/com/android/documentsui/UserManagerStateTest.java
@@ -36,6 +36,7 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.pm.UserProperties;
+import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.os.UserManager;
@@ -787,7 +788,10 @@ public class UserManagerStateTest {
UserId currentUser = UserId.of(mSystemUser);
initializeUserManagerState(currentUser,
Lists.newArrayList(mSystemUser, mManagedUser));
- Drawable workBadge = mMockContext.getDrawable(R.drawable.ic_briefcase);
+ Drawable workBadge = mock(Drawable.class);
+ Resources resources = mock(Resources.class);
+ when(mMockContext.getResources()).thenReturn(resources);
+ when(mMockContext.getDrawable(R.drawable.ic_briefcase)).thenReturn(workBadge);
if (SdkLevel.isAtLeastT()) {
DevicePolicyResourcesManager devicePolicyResourcesManager = mock(
DevicePolicyResourcesManager.class);
diff --git a/tests/unit/com/android/documentsui/dirlist/AppsRowManagerTest.java b/tests/unit/com/android/documentsui/dirlist/AppsRowManagerTest.java
index a69a9137d..bbe2a0030 100644
--- a/tests/unit/com/android/documentsui/dirlist/AppsRowManagerTest.java
+++ b/tests/unit/com/android/documentsui/dirlist/AppsRowManagerTest.java
@@ -93,7 +93,6 @@ public class AppsRowManagerTest {
public void setUp() {
mActionHandler = new TestActionHandler();
mTestUserIdManager = new TestUserIdManager();
- mTestUserManagerState = new TestUserManagerState();
mAppsRowManager = getAppsRowManager();
diff --git a/tests/unit/com/android/documentsui/dirlist/IconHelperTest.java b/tests/unit/com/android/documentsui/dirlist/IconHelperTest.java
index 2df2ae2a2..6a6dd3d9b 100644
--- a/tests/unit/com/android/documentsui/dirlist/IconHelperTest.java
+++ b/tests/unit/com/android/documentsui/dirlist/IconHelperTest.java
@@ -49,7 +49,7 @@ public final class IconHelperTest {
private Context mContext;
private IconHelper mIconHelper;
private ThumbnailCache mThumbnailCache = new ThumbnailCache(1000);
- private final TestUserManagerState mTestUserManagerState = new TestUserManagerState();
+ private TestUserManagerState mTestUserManagerState;
private final TestConfigStore mTestConfigStore = new TestConfigStore();
@Parameter(0)
@@ -69,6 +69,12 @@ public final class IconHelperTest {
mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
isPrivateSpaceEnabled = SdkLevel.isAtLeastS() && isPrivateSpaceEnabled;
+ if (SdkLevel.isAtLeastS()) {
+ mTestUserManagerState = new TestUserManagerState();
+ mTestUserManagerState.userIds = SdkLevel.isAtLeastV()
+ ? Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser)
+ : Lists.newArrayList(mSystemUser, mManagedUser);
+ }
mIconHelper = isPrivateSpaceEnabled
? new IconHelper(mContext, State.MODE_LIST, /* maybeShowBadge= */ true,
mThumbnailCache, null, mTestUserManagerState, mTestConfigStore)
@@ -76,9 +82,6 @@ public final class IconHelperTest {
mThumbnailCache, mManagedUser, null, mTestConfigStore);
if (isPrivateSpaceEnabled) {
mTestConfigStore.enablePrivateSpaceInPhotoPicker();
- mTestUserManagerState.userIds = SdkLevel.isAtLeastV()
- ? Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser)
- : Lists.newArrayList(mSystemUser, mManagedUser);
}
}
@@ -125,7 +128,9 @@ public final class IconHelperTest {
@Test
public void testShouldShowBadge_returnFalseOnManagedUser_withoutMultipleUsers() {
if (!isPrivateSpaceEnabled) return;
- mTestUserManagerState.userIds = Lists.newArrayList(mManagedUser);
+ if (SdkLevel.isAtLeastS()) {
+ mTestUserManagerState.userIds = Lists.newArrayList(mManagedUser);
+ }
mIconHelper = new IconHelper(mContext, State.MODE_LIST, /* maybeShowBadge= */ true,
mThumbnailCache, /* mManagedUser= */ null, mTestUserManagerState, mTestConfigStore);
assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse();
diff --git a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
index 049d064d0..68bb18867 100644
--- a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
+++ b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
@@ -77,6 +77,7 @@ import com.android.modules.utils.build.SdkLevel;
import com.google.common.collect.Lists;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -537,23 +538,35 @@ public class ActionHandlerTest {
assertRootPicked(TestProvidersAccess.DOWNLOADS.getUri());
}
+ // Ignoring the test because it uses hidden api DragEvent#obtain() and changes to the api is
+ // causing failure on older base builds
+ // TODO: b/343206763 remove dependence on hidden api
+ @Ignore
@Test
public void testDragAndDrop_OnReadOnlyRoot() throws Exception {
assumeTrue(VersionUtils.isAtLeastS());
RootInfo root = new RootInfo(); // root by default has no SUPPORT_CREATE flag
- DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, null, null, null,
+ DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, 0, null, null, null,
null, null, true);
assertFalse(mHandler.dropOn(event, root));
}
+ // Ignoring the test because it uses hidden api DragEvent#obtain() and changes to the api is
+ // causing failure on older base builds
+ // TODO: b/343206763 remove dependence on hidden api
+ @Ignore
@Test
public void testDragAndDrop_OnLibraryRoot() throws Exception {
assumeTrue(VersionUtils.isAtLeastS());
- DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, null, null, null,
+ DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, 0, null, null, null,
null, null, true);
assertFalse(mHandler.dropOn(event, TestProvidersAccess.RECENTS));
}
+ // Ignoring the test because it uses hidden api DragEvent#obtain() and changes to the api is
+ // causing failure on older base builds
+ // TODO: b/343206763 remove dependence on hidden api
+ @Ignore
@Test
public void testDragAndDrop_DropsOnWritableRoot() throws Exception {
assumeTrue(VersionUtils.isAtLeastS());
@@ -562,7 +575,7 @@ public class ActionHandlerTest {
// our Clipper is getting the original CipData passed in.
Object localState = new Object();
ClipData clipData = ClipDatas.createTestClipData();
- DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, localState, null,
+ DragEvent event = DragEvent.obtain(DragEvent.ACTION_DROP, 1, 1, 0, 0, 0, localState, null,
clipData, null, null, true);
mHandler.dropOn(event, TestProvidersAccess.DOWNLOADS);
diff --git a/tests/unit/com/android/documentsui/sidebar/RootsFragmentTest.java b/tests/unit/com/android/documentsui/sidebar/RootsFragmentTest.java
index 39e8ea27e..6a7b86415 100644
--- a/tests/unit/com/android/documentsui/sidebar/RootsFragmentTest.java
+++ b/tests/unit/com/android/documentsui/sidebar/RootsFragmentTest.java
@@ -63,7 +63,7 @@ public class RootsFragmentTest {
private RootsFragment mRootsFragment;
private TestEnv mEnv;
private final TestConfigStore mTestConfigStore = new TestConfigStore();
- private final TestUserManagerState mTestUserManagerState = new TestUserManagerState();
+ private TestUserManagerState mTestUserManagerState;
private static final String[] EXPECTED_SORTED_RESULT = {
TestProvidersAccess.RECENTS.title,
@@ -105,11 +105,12 @@ public class RootsFragmentTest {
when(mContext.getApplicationContext()).thenReturn(
InstrumentationRegistry.getInstrumentation().getTargetContext());
- isPrivateSpaceEnabled = SdkLevel.isAtLeastS() && isPrivateSpaceEnabled;
- if (isPrivateSpaceEnabled) {
+ if (SdkLevel.isAtLeastS() && isPrivateSpaceEnabled) {
mTestConfigStore.enablePrivateSpaceInPhotoPicker();
+ mTestUserManagerState = new TestUserManagerState();
mTestUserManagerState.canFrowardToProfileIdMap.put(UserId.DEFAULT_USER, true);
}
+ isPrivateSpaceEnabled = SdkLevel.isAtLeastS() && isPrivateSpaceEnabled;
mRootsFragment = new RootsFragment();
}
diff --git a/tests/unit/com/android/documentsui/sidebar/UserItemsCombinerTest.java b/tests/unit/com/android/documentsui/sidebar/UserItemsCombinerTest.java
index f8f4fd0d1..fc9d1f301 100644
--- a/tests/unit/com/android/documentsui/sidebar/UserItemsCombinerTest.java
+++ b/tests/unit/com/android/documentsui/sidebar/UserItemsCombinerTest.java
@@ -461,6 +461,7 @@ public class UserItemsCombinerTest {
rootListAllUsers.add(PRIVATE_ITEMS);
}
mCombiner = new UserItemsCombiner(mResources, mDpm, mState)
+ .overrideCurrentUserForTest(WORK_USER)
.setRootListForAllUsers(rootListAllUsers);
assertThat(mCombiner.createPresentableListForAllUsers(mUserIds, mUserIdToLabelMap))