Loading core/java/android/os/storage/VolumeInfo.java +5 −1 Original line number Diff line number Diff line Loading @@ -407,8 +407,12 @@ public class VolumeInfo implements Parcelable { * {@link #TYPE_EMULATED} or {@link #TYPE_PUBLIC}. */ public @Nullable Intent buildBrowseIntent() { return buildBrowseIntentForUser(UserHandle.myUserId()); } public @Nullable Intent buildBrowseIntentForUser(int userId) { final Uri uri; if (type == VolumeInfo.TYPE_PUBLIC && mountUserId == UserHandle.myUserId()) { if (type == VolumeInfo.TYPE_PUBLIC && mountUserId == userId) { uri = DocumentsContract.buildRootUri(DOCUMENT_AUTHORITY, fsUuid); } else if (type == VolumeInfo.TYPE_EMULATED && isPrimary()) { uri = DocumentsContract.buildRootUri(DOCUMENT_AUTHORITY, Loading packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +1 −1 Original line number Diff line number Diff line Loading @@ -640,7 +640,7 @@ public class StorageNotification extends SystemUI { } private PendingIntent buildBrowsePendingIntent(VolumeInfo vol) { final Intent intent = vol.buildBrowseIntent(); final Intent intent = vol.buildBrowseIntentForUser(vol.getMountUserId()); final int requestKey = vol.getId().hashCode(); return PendingIntent.getActivityAsUser(mContext, requestKey, intent, Loading Loading
core/java/android/os/storage/VolumeInfo.java +5 −1 Original line number Diff line number Diff line Loading @@ -407,8 +407,12 @@ public class VolumeInfo implements Parcelable { * {@link #TYPE_EMULATED} or {@link #TYPE_PUBLIC}. */ public @Nullable Intent buildBrowseIntent() { return buildBrowseIntentForUser(UserHandle.myUserId()); } public @Nullable Intent buildBrowseIntentForUser(int userId) { final Uri uri; if (type == VolumeInfo.TYPE_PUBLIC && mountUserId == UserHandle.myUserId()) { if (type == VolumeInfo.TYPE_PUBLIC && mountUserId == userId) { uri = DocumentsContract.buildRootUri(DOCUMENT_AUTHORITY, fsUuid); } else if (type == VolumeInfo.TYPE_EMULATED && isPrimary()) { uri = DocumentsContract.buildRootUri(DOCUMENT_AUTHORITY, Loading
packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +1 −1 Original line number Diff line number Diff line Loading @@ -640,7 +640,7 @@ public class StorageNotification extends SystemUI { } private PendingIntent buildBrowsePendingIntent(VolumeInfo vol) { final Intent intent = vol.buildBrowseIntent(); final Intent intent = vol.buildBrowseIntentForUser(vol.getMountUserId()); final int requestKey = vol.getId().hashCode(); return PendingIntent.getActivityAsUser(mContext, requestKey, intent, Loading