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 committed 2017-06-30 09:32:27 +02:00
1 parent b14507dd90
commit 9c4607b454
1 file changed
+5
@@ -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();