am b4158f0e: Merge "Only offer migration between private volumes." into mnc-dev

* commit 'b4158f0e15bdc55de40a4e5f5a17c9e4a6325b61':
  Only offer migration between private volumes.
This commit is contained in:
Jeff Sharkey
2015-08-14 18:29:15 +00:00
committed by Android Git Automerger

View File

@@ -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