Skip to content

Commit

Permalink
fix android l
Browse files Browse the repository at this point in the history
  • Loading branch information
nnjun committed Jun 4, 2021
1 parent 57b9def commit 6d4ea87
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public StorageVolume[] getVolumeList(int uid, String packageName, int flags, int
}
try {
StorageVolume[] storageVolumes = reflection.android.os.storage.StorageManager.getVolumeList.call(BUserHandle.getUserId(Process.myUid()), 0);
if (storageVolumes == null)
return null;
for (StorageVolume storageVolume : storageVolumes) {
reflection.android.os.storage.StorageVolume.mPath.set(storageVolume, BEnvironment.getExternalUserDir(userId));
if (BuildCompat.isPie()) {
Expand All @@ -44,7 +46,7 @@ public StorageVolume[] getVolumeList(int uid, String packageName, int flags, int
} catch (Exception e) {
e.printStackTrace();
}
return new StorageVolume[]{};
return null;
}

@Override
Expand Down

0 comments on commit 6d4ea87

Please sign in to comment.