diff --git a/shell/android/src/com/reicast/emulator/FileBrowser.java b/shell/android/src/com/reicast/emulator/FileBrowser.java index ec42a75d9..cb5095ecb 100644 --- a/shell/android/src/com/reicast/emulator/FileBrowser.java +++ b/shell/android/src/com/reicast/emulator/FileBrowser.java @@ -290,9 +290,7 @@ public class FileBrowser extends Fragment { final View childview = parentActivity.getLayoutInflater().inflate( R.layout.app_list_item, null, false); - final boolean webInfo = mPrefs.getBoolean(Config.pref_gamedetails, false); - - final XMLParser xmlParser = new XMLParser(game, index, webInfo); + final XMLParser xmlParser = new XMLParser(game, index, mPrefs); xmlParser.setViewParent(parentActivity, childview); xmlParser.execute(game.getName()); @@ -304,7 +302,7 @@ public class FileBrowser extends Fragment { new OnClickListener() { public void onClick(View view) { vib.vibrate(50); - if (webInfo) { + if (mPrefs.getBoolean(Config.pref_gamedetails, false)) { final AlertDialog.Builder builder = new AlertDialog.Builder(parentActivity); builder.setCancelable(true); builder.setTitle(getString(R.string.game_details, diff --git a/shell/android/src/com/reicast/emulator/MainActivity.java b/shell/android/src/com/reicast/emulator/MainActivity.java index 84bce4433..a241b08ec 100644 --- a/shell/android/src/com/reicast/emulator/MainActivity.java +++ b/shell/android/src/com/reicast/emulator/MainActivity.java @@ -519,11 +519,6 @@ public class MainActivity extends SlidingFragmentActivity implements menuHeading.setText(title); } - /** - * When using the ActionBarDrawerToggle, you must call it during - * onPostCreate() and onConfigurationChanged()... - */ - @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); diff --git a/shell/android/src/com/reicast/emulator/XMLParser.java b/shell/android/src/com/reicast/emulator/XMLParser.java index b3a6b0fb1..4f5f1ccbe 100755 --- a/shell/android/src/com/reicast/emulator/XMLParser.java +++ b/shell/android/src/com/reicast/emulator/XMLParser.java @@ -27,7 +27,10 @@ import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.SAXException; +import com.reicast.emulator.config.Config; + import android.content.Context; +import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; @@ -44,7 +47,7 @@ import android.widget.TextView; public class XMLParser extends AsyncTask { - private boolean webInfo; + private SharedPreferences mPrefs; private File game; private int index; private View childview; @@ -56,8 +59,8 @@ public class XMLParser extends AsyncTask { public SparseArray game_details = new SparseArray(); public SparseArray game_preview = new SparseArray(); - public XMLParser(File game, int index, boolean webInfo) { - this.webInfo = webInfo; + public XMLParser(File game, int index, SharedPreferences mPrefs) { + this.mPrefs = mPrefs; this.game = game; this.index = index; } @@ -114,7 +117,7 @@ public class XMLParser extends AsyncTask { @Override protected String doInBackground(String... params) { String filename = game_name = params[0]; - if (isNetworkAvailable() && webInfo) { + if (isNetworkAvailable() && mPrefs.getBoolean(Config.pref_gamedetails, false)) { if (params[0].contains("[")) { filename = params[0].substring(0, params[0].lastIndexOf("[")); } else {