summaryrefslogtreecommitdiff
authorBaocheng Sun <baocheng.sun@amlogic.com>2017-12-04 04:34:25 (GMT)
committer Baocheng Sun <baocheng.sun@amlogic.com>2017-12-04 06:11:08 (GMT)
commitd5c78dd506172e25cb9dc486cec7db5e6f9d46b3 (patch)
treeec6ad60e488004bbb743ed29928bce83ebb176ef
parent56c6c8a49dfa6cbb99e90caf7acc38839771cbe3 (diff)
downloaddroidvold-d5c78dd506172e25cb9dc486cec7db5e6f9d46b3.zip
droidvold-d5c78dd506172e25cb9dc486cec7db5e6f9d46b3.tar.gz
droidvold-d5c78dd506172e25cb9dc486cec7db5e6f9d46b3.tar.bz2
droidvold: skip handle vfat udisks by default [1/1]
PD#153442 Most vfat udisks will be handled by vold. But droidvold has no permissions to use sgdisk to get the metadata of udisks. Droidvold use below methods to detect the exceptions. When vfat udisk is inserted, it sleeps some time and check the mounttab, then decides whether to mount it. But the sleep time is hard to determine as the fscheck time is various. So it's better to skip handle vfat udisks by default. Change-Id: I7ff1e76ff8f2f9519169374fc2e88edbc3163c5b
Diffstat
-rw-r--r--PublicVolume.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/PublicVolume.cpp b/PublicVolume.cpp
index 3e24663..27efb4a 100644
--- a/PublicVolume.cpp
+++ b/PublicVolume.cpp
@@ -108,13 +108,18 @@ status_t PublicVolume::doMount() {
mRawPath = StringPrintf("/mnt/media_rw/%s", stableName.c_str());
VolumeManager *vm = VolumeManager::Instance();
- //if (!mJustPhysicalDev && mFsType == "vfat") {
+
if (mFsType == "vfat") {
- sleep(2);
+#ifdef HAS_VFAT
+ sleep(5);
if (vm->isMountpointMounted(mRawPath.c_str())) {
LOG(DEBUG) << getId() << " vfat will handle by vold";
return 0;
}
+#else
+ LOG(DEBUG) << getId() << " vfat will handle by vold";
+ return 0;
+#endif
}
if (vm->isMountpointMounted(mRawPath.c_str())) {