auto import from //branches/cupcake/...@130745

This commit is contained in:
The Android Open Source Project
2009-02-10 15:44:05 -08:00
parent 590c0a97ff
commit 1feaa85791
122 changed files with 5734 additions and 4925 deletions

View File

@@ -60,6 +60,9 @@ public class SdCardSettings extends Activity
Button unmountButton = (Button)findViewById(R.id.sdcard_unmount);
unmountButton.setOnClickListener(mUnmountButtonHandler);
Button formatButton = (Button)findViewById(R.id.sdcard_format);
formatButton.setOnClickListener(mFormatButtonHandler);
mTotalSize = (TextView)findViewById(R.id.total);
mUsedSize = (TextView)findViewById(R.id.used);
mAvailableSize = (TextView)findViewById(R.id.available);
@@ -69,6 +72,8 @@ public class SdCardSettings extends Activity
intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED);
intentFilter.addAction(Intent.ACTION_MEDIA_SHARED);
intentFilter.addAction(Intent.ACTION_MEDIA_CHECKING);
intentFilter.addAction(Intent.ACTION_MEDIA_NOFS);
intentFilter.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL);
intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
@@ -198,6 +203,15 @@ public class SdCardSettings extends Activity
}
};
OnClickListener mFormatButtonHandler = new OnClickListener() {
public void onClick(View v) {
try {
mMountService.formatMedia(Environment.getExternalStorageDirectory().toString());
} catch (RemoteException ex) {
}
}
};
private int mStatus;
private IMountService mMountService;