Merge "Check for null path in getInternalPathForUser"

This commit is contained in:
Treehugger Robot
2018-06-08 20:16:14 +00:00
committed by Gerrit Code Review

View File

@@ -318,7 +318,9 @@ public class VolumeInfo implements Parcelable {
* {@link android.Manifest.permission#WRITE_MEDIA_STORAGE}.
*/
public File getInternalPathForUser(int userId) {
if (type == TYPE_PUBLIC) {
if (path == null) {
return null;
} else if (type == TYPE_PUBLIC) {
// TODO: plumb through cleaner path from vold
return new File(path.replace("/storage/", "/mnt/media_rw/"));
} else {