android: Don't update state fragment if not attached to an Activity

When the bound state service finally connects we might not actually be
attached to an Activity.
This commit is contained in:
Tobias Brunner
2017-06-30 09:32:27 +02:00
parent b14507dd90
commit 9c4607b454
@@ -189,6 +189,11 @@ public class VpnStateFragment extends Fragment implements VpnStateListener
ImcState imcState = mService.getImcState();
String name = "";
if (getActivity() == null)
{
return;
}
if (profile != null)
{
name = profile.getName();