android: Use Activity as context for VpnProfileAdapter to fix theme

When using the application context theme customizations wouldn't get
applied for some reason.
This commit is contained in:
Tobias Brunner
2016-04-27 14:24:27 +02:00
parent 19e22af199
commit 2a68938b2e
@@ -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