Fix up findSelectionHotspot and remove unused methods
When the use_material3 flag is enabled, the findSelectionHotspot method attempts to find the `item_root` UiObject2. However it appears like this ID isn't available. The method then ends up traversing the hierarchy until the dir_list is found and ends up selecting the first item in the list instead. Update that method to instead check at each layer if there exists a hotspot and return in that case. There are a number of methods that are not being used either (which call findSelectionHotspot) so let's remove those to avoid having an inflated number of callees for this method. Bug: 383669583 Test: atest com.android.documentsui.FileManagementUiTest Flag: com.android.documentsui.flags.use_material3 Change-Id: Ifca68eb60563ebd2b5a42ad7615ad60d49106fc4
Loading
Please register or sign in to comment