Follow storage refactoring in system.

Also add entry point for SystemUI unmounting, and require permissions
when launching into those flows.

Bug: 19993667
Change-Id: I703d2e5f118848a2e2e96ce1d7f970e5705a288a
This commit is contained in:
Jeff Sharkey
2015-04-14 16:44:34 -07:00
parent e29dae683e
commit 2949a4ab4d
16 changed files with 104 additions and 89 deletions

View File

@@ -46,9 +46,9 @@ public class PrivateVolumeFormatConfirm extends InstrumentedFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final StorageManager storage = getActivity().getSystemService(StorageManager.class);
final String volumeId = getArguments().getString(StorageSettings.EXTRA_VOLUME_ID);
final String volumeId = getArguments().getString(VolumeInfo.EXTRA_VOLUME_ID);
mVolume = storage.findVolumeById(volumeId);
mDisk = storage.findDiskByVolumeId(volumeId);
mDisk = storage.findDiskById(mVolume.diskId);
final View view = inflater.inflate(R.layout.storage_internal_format, container, false);
final TextView body = (TextView) view.findViewById(R.id.body);
@@ -65,7 +65,7 @@ public class PrivateVolumeFormatConfirm extends InstrumentedFragment {
@Override
public void onClick(View v) {
final Intent intent = new Intent(getActivity(), StorageWizardFormatProgress.class);
intent.putExtra(StorageWizardBase.EXTRA_DISK_ID, mDisk.id);
intent.putExtra(DiskInfo.EXTRA_DISK_ID, mDisk.id);
intent.putExtra(StorageWizardFormatProgress.EXTRA_FORMAT_PUBLIC, true);
startActivity(intent);
getActivity().finish();