Skip to content

Commit 13e6157

Browse files
author
梁丽欣
authored
Fix Android 11 storage redirect
Android 11 must enable storage redirect or crash
1 parent dfa1862 commit 13e6157

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

VirtualApp/lib/src/main/java/com/lody/virtual/client/VClientImpl.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ private void startIOUniformer() {
484484
private void setupVirtualStorage(ApplicationInfo info, int userId) {
485485
VirtualStorageManager vsManager = VirtualStorageManager.get();
486486
boolean enable = vsManager.isVirtualStorageEnable(info.packageName, userId);
487-
if (!enable) {
487+
// Android 11, force enable storage redirect.
488+
if (!enable && !(Build.VERSION.SDK_INT >= 30)) {
488489
// There are lots of situation to deal, I am tired, disable it now.
489490
// such as: FileProvider.
490491
return;

0 commit comments

Comments
 (0)