summaryrefslogtreecommitdiff
path: root/src/com
AgeCommit message (Collapse)Author
2025-09-18[SP 2025-09-01] Trim the application name to make it safe for presentationbanksia-dev Ben Reich
The application name is presented in the ConfirmFragment and as such we don't want to allow for any length. This follows a similar approach to PackageManager using the TextUtils.makeSafeForPresentation with a total available character length of 500. This removes the unused getCallingAppName from the DirectoryFragment as it was causing false positives from DirectoryFragment to avoid false positives when trying to find who calls the Shared function. On top of this, add some quotation marks around the app name to avoid the app name being a contination of the existing text in the dialog, e.g. 'This will let app name access current and future content storage in Alarms' will now be 'This will let "app name" access current and future content storage'. Bug: 397216537 Test: atest com.android.documentsui.picker.ApplicationNameTest Flag: EXEMPT bug fix Change-Id: Iad0d03de09b1e4ad953bd6bd46a619cfcc56d384 (cherry picked from commit c8ef2db3bb4645704384226976e59583b9e8d3d3)
2025-03-20Merge "[DocsUI Peek] Initial Peek overlay and view manager" into main Jeremie Boulic
2025-03-20Merge "Add the job progress panel" into main Austin Tankiang
2025-03-20[DocsUI M3] Re-layout file list on window size change Cassy Chun-Crogan
Previously only a directory load or an app bar layout change would re-layout the file list. A lot of small, incremental window size changes would not trigger a re-layout leading to a strange UI or overcrowded items or excessive space. Update the layout whenever the AnimationView (the directory fragment) observes a size change. Introduce an OnSizeChangedListener to trigger the re-layout. Also use the dimens grid_width, grid_height and grid_item_margin on the grid item (item_doc_grid.xml) as these are also used by the DirectoryFragment.java to get the correct spacing for the layout. See bug for demo video. Bug: 404625076 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I5e2a94757b8effc2462f818bc2fa286fefcd4740
2025-03-20Add the job progress panel Austin Tankiang
This panel is displayed on click of the job toolbar icon. This also changes the context passed into files.MenuManager to be the activity context as the application context doesn't have the theme information required for JobPanelController to inflate layouts. Bug: 385841754 Test: atest -c 'DocumentsUIGoogleTests:com.android.documentsui.JobPanelUiTest' Flag: com.android.documentsui.flags.visual_signals_ro Change-Id: Idd95bd97863892407ed740b3ff8a013408e37b6a
2025-03-19Merge "Stop system bar areas from being transparent" into main Treehugger Robot
2025-03-19Stop system bar areas from being transparent Ben Reich
On phones the layout is inset to accomodate for the system bars. When material 3 is enabled, the path bar is moved to the bottom of the window. When this happens there is a gap created from the inset where it is made a transparent colour that effectively shows the scrolling grid / list view. Stop that behaviour and set the default color in M3 to be the background colour. Fix: 403481518 Test: m DocumentsUIGoogle on bluejay and verify bottom bar Flag: com.android.documentsui.flags.use_material3 Change-Id: Icb565c80bbb30a6e84486319c1d6914c81bbf03a
2025-03-19[DocsUI Peek] Initial Peek overlay and view manager Jeremie Boulic
Define the initial Peek fragment, with its associated layout. If Peek is enabled, the PeekViewManager, instantiated when DocsUI is launched, loads the PeekFragment (with its inflated view) in its hidden container. Flag: com.android.documentsui.flags.use_material3 Flag: com.android.documentsui.flags.use_peek_preview_ro Test: DocumentsUIGoogleTests:com.android.documentsui.peek.PeekUiTest Test: DocumentsUIGoogleTests:c.a.d.files.ActionHandlerTest#testShowPeek Bug: 382163291 Bug: 382163274 Change-Id: I7fdd1afd856803091425b8257b69206746530989
2025-03-18Merge "[DocsUI M3] Restyle breadcrumb" into main Wenbo Jie (介文博)
2025-03-18Merge "[DocsUI M3] Use dynamic color for Mime type icons" into main Wenbo Jie (介文博)
2025-03-18Merge "[DocsUI, Search]: Use class name in logging." into main Bo Majewski
2025-03-18[DocsUI M3] Restyle breadcrumb Wenbo Jie
Check the attached bug for the demo. Bug: 377770982 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I62f3b2e84d92730beee5f7d12bc14e00a2daef94
2025-03-18[DocsUI M3] Use dynamic color for Mime type icons Wenbo Jie
Since dynamic color in RRO Mime type icons is not supported currently, as a workaround, we define a map in our app code to achieve this custom color mapping for certain Mime type icons. Check the attached bug for the before/after comparison. Bug: 380746671 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Ibdfa3cc25763b6910be8cee158cc4ec912581683
2025-03-18[DocsUI M3] Update thumbnail border width to 1dp Wenbo Jie
Check the attached bug for the before/after comparison. Bug: 404256900 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I8471fc177230db3645ff68e502dbc5ef710f849c
2025-03-17Merge "[DocsUI M3] Fix the corner pixelation for thumbnail" into main Treehugger Robot
2025-03-17Merge "Add job progress icon to the app bar" into main Austin Tankiang
2025-03-17Merge "[DocsUI M3] Fix crash in grid mode due to missing method in older ↵ Treehugger Robot
JDK" into main
2025-03-18[DocsUI, Search]: Use class name in logging. Bo Majewski
To make more obvious which version of the loader is calling based method, we change BaseFileLoader to this::class.simpleName. Bug: 381326491 Test: m DocumentsUIGoogle Flag: com.android.documentsui.flags.use_search_v2_read_only Change-Id: Ib8cb36bfe095a6407b649d743a0a5588561cb788
2025-03-17Merge "[DocsUI M3] Util function for resolving material colors" into main Wenbo Jie (介文博)
2025-03-17Merge "[DocsUI M3] Fix alignment issues in RTL" into main Wenbo Jie (介文博)
2025-03-17Merge "[DocsUI] Click search chip should reset scroll view" into main Wenbo Jie (介文博)
2025-03-17[DocsUI M3] Util function for resolving material colors Wenbo Jie
This is a preparation for the Mime type icon color customization. Bug: 380746671 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Id0e50617ac06308433983a2581d5946793f228e8
2025-03-17Add job progress icon to the app bar Austin Tankiang
This adds a progress indicator to the app bar showing total progress of running jobs. It is not yet interactable. Bug: 385840940 Test: atest -c 'DocumentsUIGoogleTests:com.android.documentsui.JobPanelControllerTest' Flag: com.android.documentsui.flags.visual_signals_ro Change-Id: I9d81a0f36500c2239b7c7007efb3b1aae98467eb
2025-03-17[DocsUI M3] Fix the corner pixelation for thumbnail Wenbo Jie
Thumbnail corner in list/grid view shows a weird pixelation issue, this CL applies a custom outline to the ImageView which holds the thumbnail to fix the issue. Check the attached bug for the before/after comparison. Bug: 403413105 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I8ac34e5b0fc7d92d36006a9e2bb8315ef8cb5dca
2025-03-16[DocsUI M3] Fix crash in grid mode due to missing method in older JDK Cassy Chun-Crogan
Removed usage of CharSequence#isEmpty. This method is not available in builds made using JDK older than 15 Bug: 403484805 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Id5a8792b012fe079e88315d0bb85527f5b76bc6b
2025-03-16[DocsUI M3] Fix alignment issues in RTL Wenbo Jie
* Normalize padding for breadcrumb to make sure it align correctly in both LTR and RTL modes. * Handle RTL for Profile tabs layout. * Handle RTL for Search chip group. Check the attached bug for demo. Bug: 385784063 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Iee5f4a8dcdbbc2c416233dd3d05ce3cd2e2d07e3
2025-03-16Merge "Remove the full width "Use this folder" for all form factors" into main Treehugger Robot
2025-03-16Merge "[DocsUI M3] No literal dimension numbers in the code" into main Wenbo Jie (介文博)
2025-03-14Remove the full width "Use this folder" for all form factors Ben Reich
Fix: 403347213 Test: m DocumentsUIGoogle and view in all form factors Flag: com.android.documentsui.flags.use_material3 Change-Id: I452e2a38c88b48279396b8ff6de00ebd1c3fac29
2025-03-14[DocsUI] Click search chip should reset scroll view Wenbo Jie
When we have too many search chips which can't be display in one screen (e.g. on compact size screen), clicking the chip should reset the horizontal scroll view so the checked chip can be seen. Check the attached bug for the before/after comparison. Bug: 403433043 Test: m DocumentsUIGoogle && manual inspection Test: atest DocumentsUIGoogleTests:com.android.documentsui.queries.SearchChipViewManagerTest#testChipChecked_resetScroll Flag: com.android.documentsui.flags.use_material3 Change-Id: Ib0bcd7295953940215c967e021f8ca96e465d6f1
2025-03-14[DocsUI M3] No literal dimension numbers in the code Wenbo Jie
Dimension related view setters like setStrokeWidth are only dealing with pixel numbers, not dp numbers, so we shouldn't use any number literal in the code. Instead, we should define the dimension as a number resource and use getDimensionPixelSize() to get its pixel value in the code before calling these setter methods. Bug: 402617801 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Ifbbfd2b006985841ff9a581a485e924d1bf1976b
2025-03-13Properly handle x-profile checks Tyler Saunders
Bug: b/402367358 Test: atest DocumentsUITests Flag: EXEMPT bug_fix Change-Id: I79d9fc9e11940b478534e2fc226012ca4064f6b2
2025-03-13[DocsUI M3] Restyle drag drop badge for M3 Wenbo Jie
* When there are multiple dragging files: * add an additional drag layer * add a file counter * Update drag show (radius/offset) to match the new M3 spec. * drag shadow view is an isolated view without the theme context, so M3 color attributes like "?attr/colorXXX" can't be used directly, instead, system color tokens are being used in light/dark mode. Since system color tokens are only available in SDK 31, fallback static colors are being used in the original colors.xml. Check the attached bug for demo. Bug: 377771158 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Ia00bb0037a19813b4137d9d6cd7a42441b7f255e
2025-03-12Merge "[DocsUI M3] Remove the break between folders and files" into main Treehugger Robot
2025-03-12Merge "Update the Pick and Save bottom bars for material 3" into main Treehugger Robot
2025-03-12[DocsUI M3] Remove the break between folders and files Cassy Chun-Crogan
Folders always appear before files and a visual break between them was introduced in ag/836035. For example, if there is one folder and several files, the folder appears on the first row and the rest of the files are displayed below it. In Material3 we want to display the items continuously, so remove this break. See bug for attached screenshots. Bug: 401108520 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Idd51a10699fe1dad8101c3573afa5d19a04b6c88
2025-03-12Update the Pick and Save bottom bars for material 3 Ben Reich
There are a few changes made outside the normal realm of a resyle: - The R.layout.fragment_pick has been updated to use a ConstraintLayout. This was done as the FrameLayout was not playing nice with the right alignment of the buttons. The FrameLayout is used for intercepting clicks when the button is disabled. - The R.layout.fragment_save currently has a text field and a single button. When the second "Cancel" button is added it takes almost 50% of the width on a mobile device. To avoid this, let's not include the Cancel button on <600dp layouts only on FEATURE_PC devices. Bug: 381929144 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: Ib95c5731a1ea78276f542ff9b31d89c65ba1a52b
2025-03-12Allow files in archives to be viewed or opened François Degros
Also allow nested archives to be browsed. Bug: 402289261 Flag: com.android.documentsui.flags.use_material3 Flag: com.android.documentsui.flags.zip_ng_ro Test: Manual Change-Id: I068ae2185a20c2851b654fde5b93e31f32918258
2025-03-12Implement the 'Browse' menu item action François Degros
Bug: 400835232 Flag: com.android.documentsui.flags.use_material3 Flag: com.android.documentsui.flags.zip_ng_ro Test: Manual Change-Id: I16c46304577a659dd47bff32ae6ed213e6381acc
2025-03-10Merge "Remove use_search_v2_rw and introduce use_search_v2_read_only" into main Treehugger Robot
2025-03-11Control visibility of 'Browse' and 'Extract here' menu items François Degros
These menu items are visible when the selection contains exactly one file that is also a supported archive. Bug: 400830188 Bug: 400829875 Flag: com.android.documentsui.flags.use_material3 Flag: com.android.documentsui.flags.zip_ng_ro Test: atest DocumentsUIGoogleTests:com.android.documentsui.picker.MenuManagerTest Test: atest DocumentsUIGoogleTests:com.android.documentsui.files.MenuManagerTest Change-Id: I5fb649a462472a7df69aec3d016b61a35d670c2a
2025-03-11Remove use_search_v2_rw and introduce use_search_v2_read_only Ben Reich
Fix: 400475579 Test: m all_aconfig_declarations | grep use_search_v2_read_only Flag: com.android.documentsui.flags.use_search_v2_read_only Change-Id: I07e5a0d5f631deb4148947b79e5f1d3be4375ada
2025-03-09Merge "Control visibility of 'Browse' and 'Extract here' menu items" into main Treehugger Robot
2025-03-09Merge "Add WindowInsets back on non-freeform window devices" into main Treehugger Robot
2025-03-09Merge "[DocsUI M3] Fix the 3-section layout on compact screen" into main Wenbo Jie (介文博)
2025-03-07Add WindowInsets back on non-freeform window devices Ben Reich
For Material3 the bottom window insets were removed. Unfortunately this means the navigation gesture swipe at the base of the window overlaps the picker / saver bottom bar. This is particularly bad in the saver where the bottom bar is a text box and the gesture navigation interferes with moving the cursor in the text box. This also has the benefit of adding the behaviour where the textbox appears above the soft keyboard. Prior to this if you pressed the textbox (with material 3 enabled) it would not appear above the soft keyboard and remain hidden. Bug: 400337159 Test: Deploy to Pixel 6 and observe bottom bar is above gesture bar Flag: com.android.documentsui.flags.use_material3 Change-Id: I846ff9718455183bc136fb6ff90adb7c9b590e6d
2025-03-07Control visibility of 'Browse' and 'Extract here' menu items François Degros
Putting in place the infrastructure that will control the visibility of these menu items. These menu items are not visible yet. Bug: 400830188 Bug: 400829875 Flag: com.android.documentsui.flags.use_material3 Test: atest DocumentsUIGoogleTests:com.android.documentsui.picker.MenuManagerTest Test: atest DocumentsUIGoogleTests:com.android.documentsui.files.MenuManagerTest Change-Id: Ifb8b7803ced6b9ce2927ddc3247455c4edf26455
2025-03-07[DocsUI M3] Fix the 3-section layout on compact screen Wenbo Jie
* Update table header height as per spec. * Show table header section for medium/compact screen size with Name column only. * Add divider in compact screen size for header and breadcrumb, make it as 3-section layout, similar to other screen size layouts. * Adjust the bottom section layout in compact screen to prevent breadcrumb section from being shadowed by the saver footer in file saver mode. Check the attached bug for demo. Bug: 399225360 Test: m DocumentsUIGoogle && manual inspection Flag: com.android.documentsui.flags.use_material3 Change-Id: I251da779013964b93835f7820dcf0b4d025cab0a
2025-03-07Control visibility of 'Browse' and 'Extract here' menu items François Degros
Start putting in place the infrastructure that will control the visibility of these menu items. These menu items are not visible yet. Bug: 400830188 Bug: 400829875 Flag: com.android.documentsui.flags.use_material3 Flag: com.android.documentsui.flags.zip_ng_ro Test: atest DocumentsUIGoogleTests:com.android.documentsui.picker.MenuManagerTest Test: atest DocumentsUIGoogleTests:com.android.documentsui.files.MenuManagerTest Change-Id: Ifdd82057e1f988965b3057ac26f7296bc6219f0f
2025-03-06Merge "Broadcast the progress of Jobs" into main Austin Tankiang