/*..
....Start the switch process
...*/
private void switchStart(){
String primaryVolumePath = mVolumes.get(0).getPath();
String secondVolumePath = mVolumes.get(1).getPath();
if (mPrimaryVolumeExistBeforeSwitch) {
/*<DTS2012031903141 huangwen 20120315 begin */
//switch primary sdcard , but primary sd card is unmounted
if (EXTERNAL_SD.equals(SystemProperties.get("persist.sys.main_storage"))
&& (Environment.MEDIA_UNMOUNTED).equals(getVolumeState(primaryVolumePath))) {
Slog.i(TAG, "switch primary sdcard , but primary sd card is unmounted");
mSwitchMainCardStage = UNMOUNT_SECONDVOLUME;
unmountVolume(secondVolumePath, true, false);
} else {
mSwitchMainCardStage = UNMOUNT_PRIMARYVOLUME;
unmountVolume(primaryVolumePath, true, false);
}
/*<DTS2012031903141 huangwen 20120315 end */
} else {
mSwitchMainCardStage = UNMOUNT_SECONDVOLUME;
unmountVolume(secondVolumePath, true, false);
}
}
/*..
....Start the switch process
...*/
private void switchStart(){
String primaryVolumePath = mVolumes.get(0).getPath();
String secondVolumePath = mVolumes.get(1).getPath();
if (mPrimaryVolumeExistBeforeSwitch) {
/*<DTS2012031903141 huangwen 20120315 begin */
//switch primary sdcard , but primary sd card is unmounted
if (EXTERNAL_SD.equals(SystemProperties.get("persist.sys.main_storage"))
&& (Environment.MEDIA_UNMOUNTED).equals(getVolumeState(primaryVolumePath))) {
Slog.i(TAG, "switch primary sdcard , but primary sd card is unmounted");
mSwitchMainCardStage = UNMOUNT_SECONDVOLUME;
unmountVolume(secondVolumePath, true, false);
} else {
mSwitchMainCardStage = UNMOUNT_PRIMARYVOLUME;
unmountVolume(primaryVolumePath, true, false);
}
/*<DTS2012031903141 huangwen 20120315 end */
} else {
mSwitchMainCardStage = UNMOUNT_SECONDVOLUME;
unmountVolume(secondVolumePath, true, false);
}
}
/*..