Hide the Gallery and prefer Media App when enabled.
We're migrating away from the old Gallery chrome app. When MediaApp is enabled, r759170 ensures we pick chrome://media-app over Gallery. E.g., for the task request that comes from the Camera app to open the camera roll. This CL updates the set of tasks shown in the files app to match that logic, And implements the product request to: - Hide the Gallery in any case where the Media App can handle a file, - (ignoring any explicit preference for Gallery in this case), and - Ensure Media App is the "default" handler if there is no preference for a different app (even if that app would normally be default merely through having been installed). IsFallbackFileHandler becomes simpler because MediaApp now "can't" be a fallback handler to apply that logic, which is now encapsulated in AdjustTasksForMediaApp(). Existing expectations FileTasksBrowserTest don't change, but there are now some extra checks: - Verify that for every test case, MediaApp and Gallery are never both presented as options. - New tests are added for the logic that ensures Media App is chosen over installed apps, unless that app is an explicit user preference. Bug: 1030935, b/153387960, 1071289 Change-Id: I942dd47712817c0bc8767de7ff28d858f5e11a17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2150528 Commit-Queue: Trent Apted <tapted@chromium.org> Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Cr-Commit-Position: refs/heads/master@{#760029}
Showing
Please register or sign in to comment