Commit 660a8d7b authored by Risan's avatar Risan Committed by Commit Bot

Set MyFiles as visible device

In the Android CLs, we allow this to happen and we prohibited the
creation of the Android directories. So apps can access the MyFiles
through Storage frameworks, but no default directories to be
created.

BUG=b:162793388
BUG=b:169537013
TEST=Manual test in Photos app, CtsAppSecurityHostTestCases,
CtsProviderTestCases, part of CtsMediaTestCases

Change-Id: I98ab33d6d68adfb1638bcdf07557817df257c6f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536424Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Commit-Queue: Risan <risan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830496}
parent 0be7f1f3
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "components/arc/arc_browser_context_keyed_service_factory_base.h" #include "components/arc/arc_browser_context_keyed_service_factory_base.h"
#include "components/arc/arc_features.h" #include "components/arc/arc_features.h"
#include "components/arc/arc_prefs.h" #include "components/arc/arc_prefs.h"
#include "components/arc/arc_util.h"
#include "components/arc/session/arc_bridge_service.h" #include "components/arc/session/arc_bridge_service.h"
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/user_prefs/user_prefs.h" #include "components/user_prefs/user_prefs.h"
...@@ -131,9 +132,11 @@ void ArcVolumeMounterBridge::SendMountEventForMyFiles() { ...@@ -131,9 +132,11 @@ void ArcVolumeMounterBridge::SendMountEventForMyFiles() {
// TODO(niwa): Add a new DeviceType enum value for MyFiles. // TODO(niwa): Add a new DeviceType enum value for MyFiles.
chromeos::DeviceType device_type = chromeos::DeviceType::DEVICE_TYPE_SD; chromeos::DeviceType device_type = chromeos::DeviceType::DEVICE_TYPE_SD;
// Conditionally set MyFiles to be visible for P and invisible for R. In R, we use IsVisibleRead
// so this is not needed.
volume_mounter_instance->OnMountEvent(mojom::MountPointInfo::New( volume_mounter_instance->OnMountEvent(mojom::MountPointInfo::New(
DiskMountManager::MOUNTING, kMyFilesPath, kMyFilesPath, kMyFilesUuid, DiskMountManager::MOUNTING, kMyFilesPath, kMyFilesPath, kMyFilesUuid,
device_label, device_type, false)); device_label, device_type, !IsArcVmEnabled()));
} }
bool ArcVolumeMounterBridge::IsVisibleToAndroidApps( bool ArcVolumeMounterBridge::IsVisibleToAndroidApps(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment