summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/com/wireguard/android/SettingsActivity.java6
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();
}
}