Settings: Switch to new MountService api names

Signed-off-by: San Mehat <san@google.com>
This commit is contained in:
San Mehat
2010-01-12 12:22:37 -08:00
parent 00d2476d8f
commit 33b0202273
3 changed files with 5 additions and 5 deletions

View File

@@ -68,7 +68,7 @@ public class MediaFormat extends Activity {
IMountService.Stub.asInterface(ServiceManager.getService("mount")); IMountService.Stub.asInterface(ServiceManager.getService("mount"));
if (service != null) { if (service != null) {
try { try {
service.formatMedia(Environment.getExternalStorageDirectory().toString()); service.formatVolume(Environment.getExternalStorageDirectory().toString());
} catch (android.os.RemoteException e) { } catch (android.os.RemoteException e) {
// Intentionally blank - there's nothing we can do here // Intentionally blank - there's nothing we can do here
Log.w("MediaFormat", "Unable to invoke IMountService.formatMedia()"); Log.w("MediaFormat", "Unable to invoke IMountService.formatMedia()");

View File

@@ -169,7 +169,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.unmountMedia(Environment.getExternalStorageDirectory().toString()); mMountService.unmountVolume(Environment.getExternalStorageDirectory().toString());
} catch (RemoteException ex) { } catch (RemoteException ex) {
} }
} }
@@ -178,7 +178,7 @@ public class SdCardSettings extends Activity
OnClickListener mFormatButtonHandler = new OnClickListener() { OnClickListener mFormatButtonHandler = new OnClickListener() {
public void onClick(View v) { public void onClick(View v) {
try { try {
mMountService.formatMedia(Environment.getExternalStorageDirectory().toString()); mMountService.formatVolume(Environment.getExternalStorageDirectory().toString());
} catch (RemoteException ex) { } catch (RemoteException ex) {
} }
} }

View File

@@ -141,7 +141,7 @@ public class Memory extends PreferenceActivity {
IMountService mountService = getMountService(); IMountService mountService = getMountService();
try { try {
if (mountService != null) { if (mountService != null) {
mountService.unmountMedia(Environment.getExternalStorageDirectory().toString()); mountService.unmountVolume(Environment.getExternalStorageDirectory().toString());
} else { } else {
Log.e(TAG, "Mount service is null, can't unmount"); Log.e(TAG, "Mount service is null, can't unmount");
} }
@@ -155,7 +155,7 @@ public class Memory extends PreferenceActivity {
IMountService mountService = getMountService(); IMountService mountService = getMountService();
try { try {
if (mountService != null) { if (mountService != null) {
mountService.mountMedia(Environment.getExternalStorageDirectory().toString()); mountService.mountVolume(Environment.getExternalStorageDirectory().toString());
} else { } else {
Log.e(TAG, "Mount service is null, can't mount"); Log.e(TAG, "Mount service is null, can't mount");
} }