Settings: sdcard: Refactor unmount calls for new api
Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
@@ -176,7 +176,7 @@ public class SdCardSettings extends Activity
|
|||||||
OnClickListener mUnmountButtonHandler = new OnClickListener() {
|
OnClickListener mUnmountButtonHandler = new OnClickListener() {
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
try {
|
try {
|
||||||
mMountService.unmountVolume(Environment.getExternalStorageDirectory().toString());
|
mMountService.unmountVolume(Environment.getExternalStorageDirectory().toString(), false);
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -151,7 +151,7 @@ public class Memory extends PreferenceActivity {
|
|||||||
IMountService mountService = getMountService();
|
IMountService mountService = getMountService();
|
||||||
try {
|
try {
|
||||||
if (mountService != null) {
|
if (mountService != null) {
|
||||||
mountService.unmountVolume(Environment.getExternalStorageDirectory().toString());
|
mountService.unmountVolume(Environment.getExternalStorageDirectory().toString(), false);
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "Mount service is null, can't unmount");
|
Log.e(TAG, "Mount service is null, can't unmount");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user