Erase SD Card fixed in Settings/Storage.
Adding the StorageVolume to the format intent. Change-Id: If1a50a2d5c5154e9f00116db536c62324c447e7c
This commit is contained in:
@@ -19,6 +19,7 @@ package com.android.settings;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.storage.StorageVolume;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
@@ -57,6 +58,10 @@ public class MediaFormat extends Activity {
|
||||
}
|
||||
Intent intent = new Intent(ExternalStorageFormatter.FORMAT_ONLY);
|
||||
intent.setComponent(ExternalStorageFormatter.COMPONENT_NAME);
|
||||
// Transfer the storage volume to the new intent
|
||||
final StorageVolume storageVolume = getIntent().getParcelableExtra(
|
||||
StorageVolume.EXTRA_STORAGE_VOLUME);
|
||||
intent.putExtra(StorageVolume.EXTRA_STORAGE_VOLUME, storageVolume);
|
||||
startService(intent);
|
||||
finish();
|
||||
}
|
||||
|
Reference in New Issue
Block a user