android: Use Activity as context for VpnProfileAdapter to fix theme
[strongswan.git] / src / frontends / android / app / src / main / java / org / strongswan / android / ui / VpnProfileListFragment.java
index fb684b5..a23df05 100644 (file)
@@ -109,15 +109,13 @@ public class VpnProfileListFragment extends Fragment
                        setHasOptionsMenu(true);
                }
 
-               Context context = getActivity().getApplicationContext();
-
                mDataSource = new VpnProfileDataSource(this.getActivity());
                mDataSource.open();
 
                /* cached list of profiles used as backend for the ListView */
                mVpnProfiles = mDataSource.getAllVpnProfiles();
 
-               mListAdapter = new VpnProfileAdapter(context, R.layout.profile_list_item, mVpnProfiles);
+               mListAdapter = new VpnProfileAdapter(getActivity(), R.layout.profile_list_item, mVpnProfiles);
        }
 
        @Override