Preferences in AppDetails now in onCreate()

This solves incompatible apks not showing up when showIncompatible is true
This commit is contained in:
Daniel Martí 2013-08-31 03:51:47 +02:00
parent a9a10667fa
commit 6651fe43e6

View File

@ -237,6 +237,13 @@ public class AppDetails extends ListActivity {
} }
resetRequired = false; resetRequired = false;
} }
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
pref_expert = prefs.getBoolean("expert", false);
pref_permissions = prefs.getBoolean("showPermissions", false);
pref_incompatible = prefs.getBoolean("showIncompatible", false);
startViews(); startViews();
} }
@ -260,11 +267,6 @@ public class AppDetails extends ListActivity {
} }
resetRequired = false; resetRequired = false;
} }
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
pref_expert = prefs.getBoolean("expert", false);
pref_permissions = prefs.getBoolean("showPermissions", false);
pref_incompatible = prefs.getBoolean("showIncompatible", false);
updateViews(); updateViews();
MenuManager.create(this).invalidateOptionsMenu(); MenuManager.create(this).invalidateOptionsMenu();