Skip to content

Commit

Permalink
[VXP]: io redirect switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Jun 29, 2018
1 parent 3f84f0c commit 19df083
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 19df083

Please sign in to comment.