SettingsActivity: directly pass through bundle
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
2cc7f6c2ea
commit
641e45e727
@ -10,10 +10,8 @@ public class SettingsActivity extends Activity {
|
|||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
final FragmentTransaction transaction = getFragmentManager().beginTransaction();
|
||||||
final Bundle args = new Bundle();
|
|
||||||
args.putBoolean("showQuickTile", getIntent().getBooleanExtra("showQuickTile", false));
|
|
||||||
final SettingsFragment fragment = new SettingsFragment();
|
final SettingsFragment fragment = new SettingsFragment();
|
||||||
fragment.setArguments(args);
|
fragment.setArguments(getIntent().getExtras());
|
||||||
transaction.replace(android.R.id.content, fragment).commit();
|
transaction.replace(android.R.id.content, fragment).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,7 +20,7 @@ public class SettingsActivity extends Activity {
|
|||||||
public void onCreate(final Bundle savedInstanceState) {
|
public void onCreate(final Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
addPreferencesFromResource(R.xml.preferences);
|
addPreferencesFromResource(R.xml.preferences);
|
||||||
if (getArguments().getBoolean("showQuickTile"))
|
if (getArguments() != null && getArguments().getBoolean("showQuickTile"))
|
||||||
((ConfigListPreference) findPreference("primary_config")).show();
|
((ConfigListPreference) findPreference("primary_config")).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user