fixed a logic error in determining the default location of user/system folders.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-04-12 02:28:18 +00:00
parent 0db0cb15f9
commit d4e4e3b251

View File

@@ -14,7 +14,6 @@ import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay; import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface; import javax.microedition.khronos.egl.EGLSurface;
import net.wagic.app.R;
import net.wagic.utils.StorageOptions; import net.wagic.utils.StorageOptions;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
@@ -118,8 +117,8 @@ public class SDLActivity extends Activity implements OnKeyListener{
public void updateStorageLocations() { public void updateStorageLocations() {
boolean usesInternalSdCard = (!getSharedPreferences(kWagicSharedPreferencesKey, MODE_PRIVATE).getBoolean(kStoreDataOnRemovableSdCardPreference, false)) && Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()); boolean usesInternalSdCard = (!getSharedPreferences(kWagicSharedPreferencesKey, MODE_PRIVATE).getBoolean(kStoreDataOnRemovableSdCardPreference, false)) && Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
systemFolder = (usesInternalSdCard ? sdcardPath : internalPath) + "/Res/"; systemFolder = (usesInternalSdCard ? internalPath : sdcardPath) + "/Res/";
userFolder = (usesInternalSdCard ? sdcardPath : internalPath) + "/User/"; userFolder = (usesInternalSdCard ? internalPath : sdcardPath) + "/User/";
} }
/** /**