aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/app/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-18 18:08:08 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-18 18:08:08 +0200
commitdad8d319953c46f60e5e586bf5619b0f72e5a44b (patch)
treea79dcc927ba0fa5258051d402e42f8b73865e6ae /app/src/main/java/com/wireguard
parentfab: use auto calculated fling threshold (diff)
downloadwireguard-android-dad8d319953c46f60e5e586bf5619b0f72e5a44b.tar.xz
wireguard-android-dad8d319953c46f60e5e586bf5619b0f72e5a44b.zip
AppListDialogFragment: getArguments is null before onCreate
Diffstat (limited to 'app/src/main/java/com/wireguard')
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
index 50de0c39..76a8c97c 100644
--- a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
@@ -39,7 +39,7 @@ public class AppListDialogFragment extends DialogFragment {
private static final String KEY_EXCLUDED_APPS = "excludedApps";
- private final List<String> currentlyExcludedApps = Arrays.asList(getArguments().getStringArray(KEY_EXCLUDED_APPS));
+ private List<String> currentlyExcludedApps;
private final ObservableKeyedList<String, ApplicationData> appData = new ObservableKeyedArrayList<>();
public static <T extends Fragment & AppExclusionListener> AppListDialogFragment newInstance(final String[] excludedApps, final T target) {
@@ -52,6 +52,13 @@ public class AppListDialogFragment extends DialogFragment {
}
@Override
+ public void onCreate(@Nullable final Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ currentlyExcludedApps = Arrays.asList(getArguments().getStringArray(KEY_EXCLUDED_APPS));
+ }
+
+ @Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
alertDialogBuilder.setTitle(R.string.excluded_applications);