Move up the setting of Prefences in AppDetails so they are actually respected

Without this, no matter how the user set the preferences, they could not see
incompatible APKs in the AppDetails.
This commit is contained in:
Kevin Everets 2014-01-15 16:04:48 -05:00
parent 68067a81c9
commit ca1a07677a

View File

@ -325,20 +325,20 @@ public class AppDetails extends ListActivity {
resetRequired = false;
}
// Set up the list...
headerView = new LinearLayout(this);
ListView lv = (ListView) findViewById(android.R.id.list);
lv.addHeaderView(headerView);
ApkListAdapter la = new ApkListAdapter(this, app.apks);
setListAdapter(la);
SharedPreferences prefs = PreferenceManager
.getDefaultSharedPreferences(getBaseContext());
pref_smallDensity = prefs.getBoolean("smallDensity", false);
pref_expert = prefs.getBoolean("expert", false);
pref_permissions = prefs.getBoolean("showPermissions", false);
pref_incompatibleVersions = prefs.getBoolean(
"incompatibleVersions", false);
Preferences.PREF_INCOMP_VER, false);
// Set up the list...
headerView = new LinearLayout(this);
ListView lv = (ListView) findViewById(android.R.id.list);
lv.addHeaderView(headerView);
ApkListAdapter la = new ApkListAdapter(this, app.apks);
setListAdapter(la);
startViews();