diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-27 05:22:54 +0100 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2017-11-27 05:22:54 +0100 |
commit | 641e45e727191ddbe5e78f19d892e4262e37d3a0 (patch) | |
tree | ee88c6e05749fade0b6b045916a55fcdbf5b9eb4 /app/src/main/java/com/wireguard | |
parent | 2cc7f6c2ea852f5b51b7022242833e6e92ce79fe (diff) |
SettingsActivity: directly pass through bundle
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/java/com/wireguard')
-rw-r--r-- | app/src/main/java/com/wireguard/android/SettingsActivity.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/src/main/java/com/wireguard/android/SettingsActivity.java b/app/src/main/java/com/wireguard/android/SettingsActivity.java index be9f5bf4..bb617b63 100644 --- a/app/src/main/java/com/wireguard/android/SettingsActivity.java +++ b/app/src/main/java/com/wireguard/android/SettingsActivity.java @@ -10,10 +10,8 @@ public class SettingsActivity extends Activity { protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); final FragmentTransaction transaction = getFragmentManager().beginTransaction(); - final Bundle args = new Bundle(); - args.putBoolean("showQuickTile", getIntent().getBooleanExtra("showQuickTile", false)); final SettingsFragment fragment = new SettingsFragment(); - fragment.setArguments(args); + fragment.setArguments(getIntent().getExtras()); transaction.replace(android.R.id.content, fragment).commit(); } @@ -22,7 +20,7 @@ public class SettingsActivity extends Activity { public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.preferences); - if (getArguments().getBoolean("showQuickTile")) + if (getArguments() != null && getArguments().getBoolean("showQuickTile")) ((ConfigListPreference) findPreference("primary_config")).show(); } } |