From 19df0839239fc8a9bfb273533f5c0e33ea220a4a Mon Sep 17 00:00:00 2001 From: tiann <923551233@qq.com> Date: Fri, 29 Jun 2018 11:26:49 +0800 Subject: [PATCH] [VXP]: io redirect switch. --- .../main/java/com/lody/virtual/client/VClientImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java b/VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java index 2ee13a62f..bd03de8fe 100644 --- a/VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java +++ b/VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java @@ -39,6 +39,7 @@ import com.lody.virtual.client.ipc.VActivityManager; import com.lody.virtual.client.ipc.VDeviceManager; import com.lody.virtual.client.ipc.VPackageManager; +import com.lody.virtual.client.ipc.VirtualStorageManager; import com.lody.virtual.client.stub.VASettings; import com.lody.virtual.helper.compat.BuildCompat; import com.lody.virtual.helper.compat.StorageManagerCompat; @@ -474,6 +475,14 @@ private void startIOUniformer() { } private void setupVirtualStorage(ApplicationInfo info, int userId) { + VirtualStorageManager vsManager = VirtualStorageManager.get(); + boolean enable = vsManager.isVirtualStorageEnable(info.packageName, userId); + if (!enable) { + // There are lots of situation to deal, I am tired, disable it now. + // such as: FileProvider. + return; + } + File vsDir = VEnvironment.getVirtualStorageDir(info.packageName, userId); if (vsDir == null || !vsDir.exists() || !vsDir.isDirectory()) { return;