Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f52ed33 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Only offer migration between private volumes.

Without this change, there is a confusing option to migrate a public
SD card volume to internal storage, which will always fail if the
user picks it, since it's not supported under the hood.

Bug: 22966671
Change-Id: Id7cad07eea6583aace398a6d64383bf7d884ae9e
parent 0814827e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -354,7 +354,9 @@ public class PrivateVolumeSettings extends SettingsPreferenceFragment {
        // Only offer to migrate when not current storage
        final VolumeInfo privateVol = getActivity().getPackageManager()
                .getPrimaryStorageCurrentVolume();
        migrate.setVisible(!Objects.equals(mVolume, privateVol));
        migrate.setVisible((privateVol != null)
                && (privateVol.getType() == VolumeInfo.TYPE_PRIVATE)
                && !Objects.equals(mVolume, privateVol));
    }

    @Override