Merge "Only return internal path when not visible." into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-29 22:16:32 +00:00
committed by Android (Google) Code Review

View File

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